Improve URL parser to allow missing hostname/dbname

Both the // and / parts of the URL are optional.  Also fix a crash that would
occur on any invalid URL.
Merge pull request #64 from dylex/missinghost

Improve URL parser to allow missing hostname/dbname