Handle URLs where the query part follows the hostname without a slash in between

For example, in http://www.example.com?a=b the hostname is
"www.example.com", not "www.example.com?a=b".  See RFC 3986, section 3.
Merge pull request #27 from legoscia/url-query-without-path

Handle URLs where the query part follows the hostname without a slash in between