added automatic closing of sockets and channel. made use of websocket.Message instead of Conn#Write/Read.
Merge pull request #1 from zond/master

Bugfix and some defers.