bundle2: add ability to write to a file to the test

Next changesets are about improving debug output during bundling. We won't be
able to simply bundle to stdin in this case. The bundle2 stream would be
interleaved with debug output.
bundle2: print debug information during bundling

The bundler class is now feed with an ui object and use it to transmit data
about the bundling process.
bundle2: print debug information during unbundling

The unbundler class is now feed with an ui object and use it to transmit data
about the unbundling process.
bundle2: implement the mandatory/advisory logic for parameter

Parameter starting with an upper case are mandatory, the one starting with a
lower case are advisory and may be ignored.
_addset: add a __len__ method

Back in the time where repo.revs(...) returned a list, calling `len(...)` on the
result was quite common. We reinstall this on _addset.

There is absolutely no easy way to test this from the command line. The commands
using this in the evolve extension will eventually land into core.
perf: unroll the result in perfrevset

With the new lazy revset implementation, we need to actually read all elements
to trigger all the computations. Otherwise a no-op if of course much faster than
the full work.
revsetbenchmapi: fix template

The revision description missed an \n
revsetbenchmark: simplify and convert the script to python

The script is now in python. That translation is very raw, more improvement to
comes:

The "current code" and "base" entry have been dropped.  This is trivial to get
same result using a tagged revision or "." in the list of benchmarked revision.

--HG--
rename : contrib/revsetbenchmarks.sh => contrib/revsetbenchmarks.py