Add commas & a test case.

It turns out that ruby doesn't care about trailing commas,
so add them for ease of adding new cases.

Change-Id: I29ee91f76c5f34e1730ddef020d37c5f20b8358a
Add Gerrit and Git linking options.

This adds support for g: and gerrit: prefixes to gerrit changeset-
numbers, and for git: and cgit: prefixes to SR repos. This also
rewrites the listening functionality to be more generic, and thus
more extensible. The existing trac ticket #NUM functionality is
also included in this, though the original function remains in
use for direct messages.

The new listening mechanism is based on a hash that contains a
regular expression and link url. Each of these is tried on a given
message (regardless of any previous matches), so combinations of
these prefixes can be used.

Change-Id: I0be6998f34b07c246052d7c27e677c205bb2157b