doc: add url.resolve() usage examples

Fixes #4913.