Get socket.io to use port 443 by default for wss connections

The logic inside io.connect really expects it to pass it a "http" or "https" url and it will handle it from there.  We passed it "ws" and "wss" urls which it isn't 100% prepared to handle.  It mostly works, but some of the logic for choosing ports and security checks to see if the protocol is "https"
Simplify socket.io io.connect logic
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
Merge pull request #298 from virtual-world-framework/branch/wss-on-443

Branch/wss on 443