Refactor MessagePredicate to extend RevWalkPredicate

RevWalkPredicate creates Repository, RevWalk objects and properly
closes them. It also adds an abstract match(repo,rw,args) method
which other git based operators can override. This refactoring enables
us to easily add more checks and new git based operators. It is useful
for a followup change which adds 'inref' operator.

Change-Id: I4b8d885890289ebff6ae348eb674f27dce132dfe
2 files changed