patch for skipping 'end', 'close' events

stream.destroy() invokes stream.removeAllListeners() within SockJS's closing sequence. To make 'end', 'close' handlers called properly, stream.destroy() should be deferred.