exchange: extract push function from localrepo

The localrepo class if far too big. Push and pull logic will be extracted and
reworked to better fit with the fact they now exchange more than plain changeset
bundle.

This changeset extract the push code. later changeset will slowly slice this
over 200 hundred lines and 8 indentation level function into smaller saner
brick.

The localrepo.push method is kept for now to limit impact on user code. But it
will be ultimately removed, now that the public supposed API is hold by peer.
push: introduce a pushoperation object

This object will hold all data and state gathered through the push. This will
allow us to split the long function into multiple small one. Smaller function
will be easier to maintains and wrap.  The idea is to blindly store all
information related to the push in this object so that each step and extension
can use them if necessary.

We start by putting the `repo` variable in the object. More migration in other
changeset.
push: ease access to current ui object

The `pushoperation.repo.ui` attribute is very commonly used. we offer a faster way
to access it directly through the push operation object.
push: move `remote` argument in the push object

One more step toward a more modular push function.
push: move `force` argument into the push object

One more step toward a more modular push function.
push: move `revs` argument into the push object

One more step toward a more modular push function.
push: move `newbranch` argument into the push object

One more step toward a more modular push function.
push: move bookmarks exchange in the exchange module

The bookmark exchange code was already extracted during a previous cycle. This
changesets moves the extracted function in this module. This function will read
and write data in the `pushoperation` object and It  is preferable to have all
core function collaborating through this object in the same place.

This changeset is pure code movement only. Code change for direct consumption of
the `pushoperation` object will come later.
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
merge with stable