Fail if PyMem_Malloc() is called without holding the GIL

Issue #26563: Debug hooks on Python memory allocators now raise a fatal error
if functions of the PyMem_Malloc() family are called without holding the GIL.
4 files changed