bpo-41842: Add codecs.unregister() function (GH-22360)

Add codecs.unregister() and PyCodec_Unregister() functions
to unregister a codec search function.
diff --git a/Include/codecs.h b/Include/codecs.h
index 3ad0f2b..37ecfb4 100644
--- a/Include/codecs.h
+++ b/Include/codecs.h
@@ -27,6 +27,14 @@
        PyObject *search_function
        );
 
+/* Unregister a codec search function and clear the registry's cache.
+   If the search function is not registered, do nothing.
+   Return 0 on success. Raise an exception and return -1 on error. */
+
+PyAPI_FUNC(int) PyCodec_Unregister(
+       PyObject *search_function
+       );
+
 /* Codec registry lookup API.
 
    Looks up the given encoding and returns a CodecInfo object with