bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI  (GH-26241) (GH-26353)

Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4);
but to fix that issue it would be enough to add it to the regular C API.

The function is undocumented, tests were added very recently ([bpo-44131]()),
and most importantly, it is not present in all builds of Python, as
the linker sometimes omits it as unused.
It should be added back when these issues are fixed.

Note that this does not affect Python's regular C API.
(cherry picked from commit d16856960e33bc5f64fc5b842f132058becafa37)

Co-authored-by: Petr Viktorin <encukou@gmail.com>

Co-authored-by: Petr Viktorin <encukou@gmail.com>
diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h
index 13f7a26..5faeb35 100644
--- a/Include/cpython/pylifecycle.h
+++ b/Include/cpython/pylifecycle.h
@@ -2,6 +2,10 @@
 #  error "this header file must not be included directly"
 #endif
 
+/* Py_FrozenMain is kept out of the Limited API until documented and present
+   in all builds of Python */
+PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
+
 /* Only used by applications that embed the interpreter and need to
  * override the standard encoding determination mechanism
  */
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 783fcb4..2df7fe6 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -31,9 +31,6 @@ PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
 
 /* Bootstrap __main__ (defined in Modules/main.c) */
 PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
-
-PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
-
 PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
 
 /* In pathconfig.c */