Add optional connect/SSL handshake timeouts

This adds optional timeouts for establishing connections and completing an SSL handshake.
> if zero, connection attempts will never time out

That seems... a little confusing. Is that the standard here?