tests: add support for inline python

An upcoming patch will include an inline python test. tests/heredoctest.py is
copied over from the Mercurial repository.
git_handler: support extracting metadata from Git extra fields

Git has a well-hidden notion of extra fields. They aren't accessible from the
CLI, but Dulwich can create them. They're a better place to store Mercurial's
extra metadata than the commit message.

An upcoming patch will switch hg-git to saving the metadata in the Git extra
fields. This commit:
(a) prepares for that
(b) extracts other Git extra fields so that commits from Git with such fields
    roundtrip correctly
git_handler: export hg extra metadata as git extra metadata (issue121)

We export new git commits with hg extra metadata stored as git extra fields.
We also ensure that parsing old commits doesn't break.
test-extra: add some more rename tests