Set default timeout on the server socket

This probably isn't the best way to solve this, but in some cases (for me, test_timeout_errors_cause_retries) if the main thread fails with an exception, the server thread will never get an accept() and it will hang indefinitely. Control won't be returned to the caller and you can't kill it with a KeyboardInterrupt.

This sets a default timeout on the socket so control is eventually returned and the tests complete.