Add optional connect/SSL handshake timeouts

This adds optional timeouts for establishing connections and completing an SSL handshake.
It's pretty standard for timeout-ish things in Java. I was thinking about changing the other `Integer` timeouts to `int`s and doing the same there for consistency.