Prevent a deadlock if ThreadedResolver resolves a unicode hostname at module-import time.
Merge pull request #964 from ajdavis/resolver-deadlock

Prevent a deadlock if ThreadedResolver resolves a unicode hostname at module-import time.