Limit bug links in Gerrit to recommended headers

Per https://wiki.openstack.org/wiki/GitCommitMessages the
recommended commit message headers for bug links are:

    Closes-Bug: #1234567
    Partial-Bug: #1234567
    Related-Bug: #1234567

This change limits the bug-specific Gerrit commentlink to only match
on the above three patterns, potentially all-lower-case, space and
pound sign optional. It should help to train developers to apply
these with greater consistency in their commits. Also support
"(start-of-word)bug:? #?\d+" separately, so that bugs mentioned
loosely in the commit message, reviews or inline code comments will
still get hyperlinked. This latter pattern does leave some ambiguity
in commit messages, however, as developers might think their bug
will get updated when they add old-style lines like "Fixes bug
1234567" instead of a .*-bug header, because both get the same
hyperlinks.

Change-Id: I57fa0ca901a7228dc0739fdd98ff12aa091f0dbe
Merge "Limit bug links in Gerrit to recommended headers"