Post-commit hook for mercurial

Follows along the same line as git. Moved GitUrlMatchers to be generic enough to be used by mercurial as well.
Merge pull request #781 from sachinsudheendra/mercurial_post_commit_hook

Post-commit hook for mercurial