Improve and polish both TCP and TLS termination.
Clean up TlsConnection a bit.