[Python-checkins] gh-114569: Use PyMem_* APIs for non-PyObjects in compiler (#114587)