Fix resource leaks in WebSocketServerProtocol(Handshake)Handler

- Related: #1975