Https proxy

Previously the timeout was set on the the connection too late in the process.
This change passes through the timeout value to _new_conn so it's set for proxy
connection attempts.

Not too happy with the interface change though and open to suggestions.
Moved this logic into a named function so it's clear what's being tested in the if branch.