patchbomb: includes series information in the header

We includes information about the series being patch bombed in all email. Two
new headers are added:

* X-Mercurial-Series-Index: index of the patches in the series (starts at 1)
* X-Mercurial-Series-Total: The total number of patches in the series

This information is available in the email subject line, but having them
formalized in the header will helps automated tools to process patches send with
modern mercurial.

--HG--
extra : rebase_source : 394d6f52db6e9f554054256a4532e403ba4a1aa4
revset: drop spanset._contained

All its users inlined it for performance reasons.
(See 1d7a2771aa36 and e2031c8ca4f8)
revset: cosmetic changes in spanset range comparison

We use the python syntax for range comparison: `a < x < c`. This is shorter,
more readable and less error prone. This comparison escaped the cleanup make in
e2031c8ca4f8
revsetbenchmark: add `::tip and draft()` to the canonical list

The want to test element on different side of the iterators.
revsetbenchmark: add a usage message when no arguments are passed

This increase the odd someone who didn't wrote will it find out how to use this
script.
revsetbenchmark: use optparse to retrieve argument

We need more flexibility. For example we'll want to run the benchmark on other
repository.
help: provide a more helpful message when no keyword are matched

Before this changeset, when no topic were matching the provided keyword ( in
command such as `hg help --keyword babar`) the output was empty. This is
confusing and unhelpful for new users seeking assistance in the help.

We now display:

  $ hg help --keyword babar
  abort: no matches
  (try "hg help" for a list of topics)

This send users in a new direction where they may find what they are looking for.
help: suggest keyword search when no topic is found

When `hg help foobar` fails, it now suggests using `hg help --keyword foobar`
instead of printing a full page of basic commands.

This should greatly increases discoverability of the `hg help --keyword`
argument.
demandimport: pass proper level to __import__ in Python 3

demandimport was failing in Python 3 with a ValueError because
__import__'s level=-1 has gone away (-1 means to try both relative
and absolute imports and relative imports don't exist in Python 3).

With this patch, demandimport still doesn't work in Python 3 (it
fails when importing a non-package module).
py3kcompat: don't convert os.environ to bytes

os.environ accepts str not bytes. Assigning bytes will result in a
run-time error.