[ticket/11509] Contrary to docs, COMMIT_RANGE is not available in PR mode.

PHPBB3-11509
[ticket/11509] Run commit message checker only in one environment.

PHPBB3-11509
[ticket/11509] Be exact when referencing the branch name.

PHPBB3-11509
Merge pull request #1999 from bantu/ticket/11509

[ticket/11509] Further improvements/fixes for the Travis CI commit message checker