url: fix/8722

This patch attempts to close this issue #8722:
- [x] feature
- [x] test
- [x] documentation
- [x] fix some style conflicts with `jshint` in test-url.js

R=@indutny, @chrisdickinson :cherries: 
I think there's one last case to check here -- `path` is present, but has no `?...`, so the output url should have no `?...` -- i.e., the `query`, `search`, and `pathname` keys are ignored if `path` is given.