Factor out the options since the two cases are almost identical.

Functionality is unchanged. This version should be the same as the
previous one.
Now, move options only relevant to the ruby server to the 0.6 case.

  - `transports`: There is no need to restrict client transports for the
	node server. The node server has a full socket.io implementation.
	(VWF's configuration happens to limit this on the server side
	though.)

  - `transportOptions`: Transport options are not available on the 0.7+
	client. Set timeouts on the server with:

        require( "socket.io" ).listen( ...,
          { "heartbeat timeout": 60, "close timeout": 60 } );
Use `location.{protocol,host}` since `location.origin` is not standard.

See:
  - https://developer.mozilla.org/en-US/docs/Web/API/window.location#Browser_compatibility
  - https://stackoverflow.com/questions/1420881/javascript-jquery-method-to-find-base-url-from-a-string/6167979#6167979
  - https://github.com/kylewelsby/window-location-origin