py-ext: Use Py_BEGIN/END_ALLOW_THREADS to gracefully shutdown Server

This is a much cleaner solution to #8