Catch wrapped SocketExceptions when SslStream.Write is being used.

Fixes exceptions like the following:

GeneralCacheException: An error occurred while attempting to execute a cache operation for Redis. (Error during processing of client 1: ) ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.