Add maskBytes benchmark.
Improve chat example.

- Log all handshake errors.
- Prevent double close on send channel.