Automatically filter staged files in check output

When a check ran against a staged file and had output that mentioned
that staged file, it would have to perform the additional task of
replacing the temporary file name for the staged file with the original
file name, via the `filter_string` method of the `StagedFile`.

We can DRY things up by having `BaseHook` automatically filter any
output returned by checks, allowing us to delete a number of duplicate
lines.

Change-Id: I829c512a8e58c70dae9551a963f2097a33eba2f1
Reviewed-on: https://gerrit.causes.com/25162
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>