Support Gerrit's ref-update and patchset-created hooks

Gerrit (http://gerrit.googlecode.com/) is a web-based code review
system which incorporates a Git server implemented with JGit
(http://www.eclipse.org/jgit/), which is a pure Java implementation
of Git.

Up to version 2.2.0 JGit still doesn't support Git standard
hooks. However, Gerrit implements its own special hooks
(https://gerrit.googlesource.com/gerrit/+/master/Documentation/config-hooks.txt),
which are rather different from Git's.

Here we implement support for two of Gerrit's hooks:

* ref-update

The 'ref-update' hook is executed synchronously when a user performs a
push to a real brach and not to one of Gerrit's virtual branches
(refs/for/*). It's purpose is the same as Git's 'update' hook and
Git::Hooks's plugins support them both together.

* patchset-created

The 'patchset-created' hook is executed asynchrounously when a user
performs a push to one of Gerrit's virtual branches (refs/for/*) in
order to record a new review request. This means that one cannot stop
the request from happening just by dying inside the hook. Instead,
what one needs to do is to invoke one of Gerrit's commands to accept
or reject the new review request.

In order to support this hook Git:Hooks now implements a general way
for hooks to invoke a routine after all normal hooks have been
processed. This way, the routine can see if there was any problem and
invoke the appropriate Gerrit command to review the patchset
appropriately.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>