Initial web socket API.

This PR is to a `websocket` feature branch for later merging into `master`.
Also callback takes a Throwable. Though I'm not quite sure whether it's ever anything other than an IOException