bpo-41078: Add pycore_list.h internal header file (GH-21057)

* Move _PyList_ITEMS() to pycore_list.h.
* The C extension "_heapq" is now built with Py_BUILD_CORE_MODULE
  macro defined to access the internal C API.
diff --git a/Modules/Setup b/Modules/Setup
index 5d428d5..470bf6b 100644
--- a/Modules/Setup
+++ b/Modules/Setup
@@ -180,7 +180,7 @@
 #_datetime _datetimemodule.c	# datetime accelerator
 #_zoneinfo _zoneinfo.c	# zoneinfo accelerator
 #_bisect _bisectmodule.c	# Bisection algorithms
-#_heapq _heapqmodule.c	# Heap queue algorithm
+#_heapq _heapqmodule.c -DPy_BUILD_CORE_MODULE	# Heap queue algorithm
 #_asyncio _asynciomodule.c  # Fast asyncio Future
 #_json -I$(srcdir)/Include/internal -DPy_BUILD_CORE_BUILTIN _json.c	# _json speedups
 #_statistics _statisticsmodule.c # statistics accelerator
diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c
index 193478d..20468c2 100644
--- a/Modules/_heapqmodule.c
+++ b/Modules/_heapqmodule.c
@@ -7,9 +7,11 @@
 */
 
 #include "Python.h"
+#include "pycore_list.h"          // _PyList_ITEMS()
 
 #include "clinic/_heapqmodule.c.h"
 
+
 /*[clinic input]
 module _heapq
 [clinic start generated code]*/