TODO: reorder priorities
Git::More::error: new method

This method should be used by plugins to produce consistent error and
warning messages to the user.
Collect errors from all hooks before dying

Git::Hooks::run_hooks now invokes every internal and external hook
inside an eval block in order to detect if they fail. After invoking
all of them it dies if at least one failed.

Moreover, hooks now shouldn't die directly when they detect a
problem. Instead, they should invoke Git::More::error to produce the
error message and return a boolean value indicating if they have
succeeded. This way they don't need to stop at the first error, but
can detect many more and generate more information to the user.

In order to support old hooks, run_hooks checks their return
values. If they return a boolean, they're treated as modern hooks. If
they return undef (and $@ is empty, so that it wasn't an exception)
they are considered to have succeeded.

Currently, when a commit is rejected due to a failed check in a
plugin, the user gets an error message. If it is an inconsequential
problem the user might decide to bypass the commit checks by passing
the B<-n> option to disable the hooks altogether. Or he may disable
the specific plugin by defining an environment variable. Either way,
the commit might have other problems that got undetected simply
because the hook aborted after detecting the first one. When the user
disables all or some checks he may well be letting pass other errors.

Yet another argument for this new mechanism is that it is necessary if
we want to implement Gerrit's asynchronous hooks.
Convert all plugins to the modern hook error interface

All plugins now have their hooks return a boolean value indicating
success and use the Git::More::error method to produce error
messages.
Mention CheckRewrite on Git::Hooks documentation
CheckLog: fix to support empty messages
Git::More::clean_cache new method

This method deletes a cache entry. It may be used by hooks just before
returning to Git::Hooks::run_hooks in order to get rid of any value
kept in the SECTION's entry.

I decided to implement it when I was converting CheckJira's $JIRA
global variable into a slot of Git::More's cache. I wanted to
disconnect from JIRA before returning from the hook and I needed to
delete the JIRA::Client object from the cache. I could do it directly,
but I thought that a general method to clean up cache entries could be
useful for other hooks.
refactor: convert a global variable into a cached value

CheckJira kept a JIRA::Client object in a global variable. This change
gets rid of that variable and uses a slot in the plugin's Git::More
cache instead. It also uses the new Git::More::clean_cache method to
delete the JIRA::Client object at the end of the hook, forcing a
disconnection from JIRA when it's no longer needed.
cleanup: fix typo
refactor: simplify code to placate Perl::Critic
v0.036

  [Interface changes]
  - Internal hooks now shouldn't die directly when they detect a
    problem. Instead, they should invoke the new Git::More::error
    method to produce the error message and return a boolean value
    indicating if they have succeeded. This way they don't need to
    stop at the first error, but can detect many more and generate
    more information to the user.

    In order to support old hooks, run_hooks checks their return
    values. If they return a boolean, they're treated as modern
    hooks. If they return undef (and $@ is empty, so that it wasn't an
    exception) they are considered to have succeeded.

  [New]
  - Git::Hooks::run_hooks only dies after having run every internal
    and external hooks and seeing that not every one of them
    succeeded. This way the user gets informed of every problem and
    not just the first one found.

  - Add method Git::More::error to be used by plugins to produce
    consistent error and warning messages to the user.

  - Add method Git::More::clean_cache to delete a cache entry. It may
    be used by hooks just before returning to Git::Hooks::run_hooks in
    order to get rid of any value kept in the SECTION's entry.

  [Fix]
  - CheckLog did not treat empty commit messages correctly.