fix hixie76 protocol

- correctly handle rawDataReceived buffering
- send the closing frame to the client before losing the connection
- send websocket upgrade header before receiving the challenge to properly
  support haproxy