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

Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index c502c43..52a6f49 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -358,6 +358,10 @@
     flags |= O_CLOEXEC;
 #endif
 
+    if (PySys_Audit("open", "Osi", nameobj, mode, flags) < 0) {
+        goto error;
+    }
+
     if (fd >= 0) {
         self->fd = fd;
         self->closefd = closefd;