Restore original streams when terminating TLS

In theory we could return to communicate without TLS after a
shutdown. It also makes sure the connection object isn't left
completely without streams.
4 files changed