Cleanup URL parsing and support remote Docker API endpoints

It is, but the Docker Ruby library expects just a path to a socket it can talk to, either a UNIX domain socket or a TCP socket.