Possible fix for some issues seen when developing locally.

* Needed a hook to call on_close so we could execute logic when a
  connection is closed from the client end.
* Websocket close failed if we didn't pass through an integer status
  code, so added defaults to send this if not present. This behaviour is
  probably wrong for non-websocket clients
Bug in sockjs url - we need to pass VERSION_STRING not just VERSION
Add hackish accessors to allow grabbing remote ip/host from requests
Remove override of method in Faye that is fixed upstream.

This version breaks with IE 10
Another hacky fix papering over a bug in SockJS.

Faye::Websocket response objects, don't have a finish method, so
currently if we reach the close method inside a Consumer from a
websocket connection, the server will force exit.

Figuring out why there is this discrepency would require some heavy duty
archaeology into the codebase, but I'm not sure it's worth it just now.
This fix just prevents us trying to call finish on an object that
doesn't respond to it.
We're seeing encoding errors running this library in production.

Attempt to encode strings as valid UTF-8 before we do the gsub
replacement into the string, as this just breaks if passed invalid
UTF-8.
Add Access-Control-Allow-Headers response for xhr transport

This is what Safari uses, and it seems unable to connect to the server
without this header in the response.
Revert encoding hack, as it breaks more than it fixes.
Bump version as I'm going to pull this into our master I think.
Switch sockjs over to using MultiJson for Json parsing/serialization
Add a travis build file.
dummy commit to test travis hook
Merge pull request #1 from cosm/bugs

Several major/minor bug fixes