Add custom matchers for testing hook checks

As more checks get contributed, there will need to be an easy way to
test these checks. To prevent a build-up of duplicate test code that
repeatedly checks the status and optionally the message returned by the
check, we add three custom check matchers: `pass`, `fail_check`, `stop`,
and `warn`, each of which accepts an optional message to match against
(regex or plain string). This makes writing tests as simple as:

    it { should pass }

    it { should fail_check /some error message/i }

    it { should warn 'Explicit error message' }

Note: we call it `fail_check` since `fail` is a reserved word in Ruby.

Change-Id: Ie2224e6d594788ebb7dbb6be04c2f7108feba7e8
Reviewed-on: https://gerrit.causes.com/23452
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Greg Hurrell <greg@causes.com>