More SSL stuff.

- Add SSL handshake timeout option
- Add certificate <-> hostname verification
- Rework janky tests
- Add friendly tests, move existing friendly test to that file