Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-18807]

Mercurial plugin currently cannot ignore post commit hooks. This pull request should handle that switch.
It is inspired by https://github.com/jenkinsci/jenkins/commit/b65c30cb368e79205edacd958d8fd98dd89f3a73.