Port of #1565. However, the handling of connections in this
branch is different than in code base for #1565 which made it
immune from issue fixed in #1565. The only case where the
connection's `nc` value could be `nil` (causing the panic)
is if the server is shutdown after the client is added to
the map but before the TLS handshake was started.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>