urlutil: extract `url` related code from `util` into the new module

Authored by marmoute.


urlutil: extract url related code from util into the new module

The new module is well fitting for this new code. And this will be useful to
make the gathered code collaborate more later.

Differential Revision: https://phab.mercurial-scm.org/D10374