util.url: add an 'islocal' method

This returns True if the URL represents a path that can be opened locally,
without needing to go through the entire URL open mechanism.

--HG--
branch : stable
hg.openpath: use url.islocal to tell if the path is local (issue3624)

Previously we used hg.islocal, which doesn't work for paths pointing to
non-repos, such as patch files.

--HG--
branch : stable
hg: note that islocal only accepts paths pointing to repos

hg.islocal doesn't work for paths pointing to non-repos, such as patch files.

--HG--
branch : stable