Fix #349: threaded resolver hangs due to import lock

Patch by @ajdavis. https://github.com/gevent/gevent/issues/349#issuecomment-31665013

Close #350.