Xfail HTTPS tests on Python 3.1
Make sure that timeout threads only get run if needed. Also make sure that they do not hang for too long if the hub is stopped.
Refactor integrated client tests to speed them up, and remove now redundant test_integration since it does not add anything.