Reuse the URL object to preserve query string, etc

We use a query string parameter to authenticate clients to our Socket.IO server.  This change follows the Javascript implementation by preserving query string, basic-auth, and other parts of the server URL when making the initial HTTP and subsequent WebSockets requests.