Refactor DownloadUrlResolver: move things out of prototype.

This avoids extra syntax and doesn't require functions to be accessed through
`this`. They also are local only to the scope of the module (and are thus
encapsulated).
Add support for non-special URL resolving.