tests: assert compatibility with Mercurial 3.0.1
git_handler: update memfilectx creation per Mercurial changes

Mercurial commit 503bb3af70fe changed the signature of the memfilectx
constructor.
git_handler: set substate to None to cope with Mercurial changes
git_handler: use mercurial's password manager

mercurial has useful own password manager.
Merge git://github.com/schacon/hg-git