Add support for returning messages from hooks

The current model where a hook returns a status and a string of output
is limited in that it requires any error type configuration to be
managed by the hook. For example, if a hook can report both errors and
warnings, but the user wants to treat errors on lines they didn't modify
as warnings, this has to be done by the hook itself.

This results in a lot of duplicate code. Solve this by allowing hooks to
return an array of `Overcommit::Hook::Message` objects and extracting
the logic for handling these arrays into the
`Overcommit::MessageProcessor` helper class.

While this logic can be applied to any hook type where the concept of
"modified lines" makes sense, we're isolating it to the pre-commit hook
as that is where it was originally envisioned to be useful. Should that
change in future, it should be easy to move the helpers from the
`Overcommit::Hook::PreCommit::Base` class into the
`Overcommit::Hook::Base` class.

Change-Id: I330cbac1a816a639fab3da07b859031dc3f58063
Reviewed-on: http://gerrit.causes.com/44898
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>