Clean up hideously deformed logic on the TLS stream handling.  Process
encryption asynchronously from the select thread.