py: Fix dummy definition of BEGIN/END_ATOMIC_SECTION.
py: Fix GC realloc issue, where memory chunks were never shrunk.

Previously, a realloc to a smaller memory chunk size would not free the
unused blocks in the tail of the chunk.