bpo-36842: Implement PEP 578 (GH-12613)

Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 1084def..9880c0d 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1250,6 +1250,13 @@
         /* nothing */;
 #endif
 
+    /* Clear all loghooks */
+    /* We want minimal exposure of this function, so define the extern
+     * here. The linker should discover the correct function without
+     * exporting a symbol. */
+    extern void _PySys_ClearAuditHooks(void);
+    _PySys_ClearAuditHooks();
+
     /* Destroy all modules */
     PyImport_Cleanup();