bpo-30395 _PyGILState_Reinit deadlock fix (#1734)

head_lock could be held by another thread when fork happened. We should
reset it to avoid deadlock.
2 files changed