exchange: have `pull` return the pulloperation object

We mimic what was done for `push` for similar reason. We are about to drop
`localrepo.pull` (for consistency with dropping `localrepo.push` and we better
have an API as extensible as `push` is.

Find explanations about localrepo.push removal in 4d52e6eb98ea.
commands: directly use exchange.pull

localrepo.pull is going away. See explanations in 4d52e6eb98ea.
subrepo: use exchange.pull

localrepo.pull is going away, see 4d52e6eb98ea for details.

--HG--
extra : rebase_source : 02c4705a10ee8762d33b21764fd28982579eb1c7
localrepo: use exchange.pull when cloning

localrepo.pull is going away. See 4d52e6eb98ea for details.

--HG--
extra : rebase_source : 9b435d327236ce77eaa9aedf4c6ae3937c7ff409
fetch: use exchange.pull

localrepo.pull is going away. See 4d52e6eb98ea for details.

--HG--
extra : rebase_source : 8cbc720d0c9ee9f23f8c844aa383c969cfe8fa2b
convert-hg: use localrepo.pull

localrepo.pull is going away. See 4d52e6eb98ea for details.

--HG--
extra : rebase_source : adc9e7c2d7baed82d75ea1aca0a17088ad56c006
transplant: use exchange.pull

localrepo.pull is going away. See 4d52e6eb98ea for details.

--HG--
extra : rebase_source : c7ab9e8c8a22f0ca21f8cd315b838f07494d4c66
locarepo: remove the `pull` method (API)

All the logic of this function is in the `exchange.pull` function for some time.
We just stop calling `localrepo.pull` in `command.pull` to have access to more
information. Leaving `localrepo.pull` in place will let third-party extensions
wrap it but it would never be called by `hg pull` making the wrapping useless.
Therefore, the method is removed so that third-party code fail noisily and
get properly upgraded.
formatter: add general way to switch hex/short functions

This seems a bit awkward, but it can avoid duplicates in annotate, tags,
branches and bookmarks.

I guess fm.hexfunc can eventually be removed (or redesigned) when it gets
template backend.
branches: format rev as integer that is necessary for generic templater
branches: port to generic templater
branches: merge white space to format string

Diffs of test output should be harmless.  A white space character is moved
into "log.changeset" color region.
branches: include active, closed and current flags in template output
filemerge: introduce :x as short version of internal:x merge tool name

"internal:" is so much typing - it is frequently specified on the command line
and gives options that are longer than any other I have seen.
filemerge: switch the default name for internal tools from internal:x to :x
contrib/synthrepo: generate initial repo contents using directory shape model

Augments the synthesize command to use an additional parameter to the analyzed
repo model: the number of files in each directory at a given snapshot. Before
synthesizing history, an arbitrary number of files will be generated in a
distribution matching the analyzed directory structure.

Intended for developing, testing and measuring scaling improvements when
importing/converting a large repository to Mercurial.
contrib/synthrepo: walk a repo's directory structure during analysis

Augments the analyze command to additionally walk the repo's current
directory structure (or of any directory tree), counting how many files
appear in which paths. This data is saved in the repo model to be used
by synthesize, for creating an initial commit with many files.

This change is aimed at developing, testing and measuring scaling
improvements when importing/converting a large repository to mercurial.