Trap the WebSocketError from em-websocket when the connection is closing.

em-websocket raises an exception if we send to a WebSocket when it is
closing. But there doesn't appear to be a way to detect this condition
when the WebSocket is closed from the other side. This patch catches
the exception for this condition and just logs it.

References #1209, #1640, #1710.