Fixes possible deadlock in threads.

If you don't wait for the thread to be finished, there could be two tornado threads active at one time, which results occasionally in a deadlock because they share the same IOLoop, see https://github.com/shazow/urllib3/issues/169.