Split parse_url to allow for external error handling

Sometimes it's useful to bubble out the error from the URL parsing so the caller can deal with the result as per its needs.

[The XHR `open()`](http://xhr.spec.whatwg.org/#the-open()-method), for example, is one place where the bubbling out of an error is required.

Blocks #2282