New version - fixes and updates

Probably it will be good to merge it to original request but I forked from you, so it have to be merged to your fork before.

There are some bug fixes (taken also from other forks)
Protocole updated to 0.3.4 -- i followed the changes from socks-node repo and made them in ruby.
Updated to use faye-websocket 0.7.1
Added closed hook to session.

All test are passing. Also tested manually with thin.

it should also work with more servers then thin, but I haven't test it yet.