Refactor HTTP server in test_hgpoller to stop correctly and quietly
Work around import order causing test failures

Importing misc reloads all modules.  Referring to symbols in other
modules with "from module import symbol" can get you stuck with old
copies of objects when reloading takes place.  Using "import module" and
referring to "module.symbol" avoids this issue.