mercurial: Update to version 3.1
Merge pull request #398 from jcftang/wip-update-mercurial

mercurial: Update to version 3.1