Make socket available in clients

A first pass at making Socket and Message available to the client. This will streamline the creation of client/server WebSocket apps.

I've written it so the use of Message in the client is optional but supported. I'd really like feedback on the API if you've got some.

This also starts adding tests to socket.