Initial web socket API.

This PR is to a `websocket` feature branch for later merging into `master`.
Kind of...

[5.5.1](http://tools.ietf.org/html/rfc6455#section-5.5.1):
> If there is a body, the first two bytes of
   the body MUST be a 2-byte unsigned integer (in network byte order)
   representing a status code with value /code/ defined in Section 7.4.
   Following the 2-byte integer, the body MAY contain UTF-8-encoded data
   with value /reason/, the interpretation of which is not defined by
   this specification.  This data is not necessarily human readable but
   may be useful for debugging or passing information relevant to the
   script that opened the connection.  As the data is not guaranteed to
   be human readable, clients MUST NOT show it to end users.

Status codes: [7.4.1](http://tools.ietf.org/html/rfc6455#section-7.4.1)