bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704)

Instead of attempting to acquire and release them all across fork
which was leading to deadlocks in some applications that had chained
their own handlers while holding multiple locks.
3 files changed