Initial web socket API.

This PR is to a `websocket` feature branch for later merging into `master`.
My only hesitation towards callback is that this isn't a one-shot callback, it's ongoing callbacks for the life of the web socket.