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 :cherries: 
> pathname is more specific than path -> path wins
> hash is more specific than path -> hash wins
hey @chrisdickinson they are not consistent, i guess in 1st line, it should be "pathname wins"