Returned socket stream will recreate underlying websocket stream if end or
error event is occurred. It uses backoff module to control the
interval between attempts to recreate a stream.

To shutdown cleanly call socket.end().

Note that we can call socket.write() right after the creation even if
underlying websocket() stream isn't open yet — stream-recreate returns
another stream which buffers writes and drains buffers on open of an
underlying stream.