Fix bug where WebSocket's close wasn't sent to client

At the moment, gate keeps holding the connection when the server closes a WebSocket connection through gate. Therefore, `onclose` of JavaScript's WebSocket object never gets called.

To be honest, I'm not too sure why this patch solves the problem... but I got it from studying another WebSocket proxy.

https://github.com/joinmytalk/drunken-hipster/blob/master/main.go#L49-L65