Minor cleanups for import deadlock test:
* Avoid _test.py suffix for file that doesn't contain test cases.
* Resolve localhost instead of tornadoweb.org to avoid network dependency.
* Tighten timeout and add an alarm so failed tests don't leave orphaned
  child processes.
* Avoid busy loop while waiting for child to exit.