Add support to protocols between 5-7

Also fix tests
Send error codes through websocket close codes

http://pusher.com/docs/pusher_protocol#error-codes