Added a connect timeout

When a connection takes longer than 10 seconds to establish there is likely a problem. This value is configurable.

May help with issue #191
Fixed a test failure
v1.6.1