Fix monkey_patch() on Python 3

The importlib module must use real thread locks, not eventlet.Semaphore.

The added unit test hangs on Python 3 without the fix.
Yes, thank you, it makes sense now.