CheckRewrite: Fix error messages
Fix invocation of git command
refactor: use Git::command to create repos in tests
Search for a useable Git.pm during build

Makefile.PL now tries to find a useable Git module if it can't find it
in @INC, by going to some usual places. If it can find it it creates a
file t/GITPERLLIB which is used by t/test-functions.pl during the
tests to set the GITPERLLIB environment variable.

This way we can hopefully test and install the distribution, even
though the user might have to set its own GITPERLIB or PERL5LIB
variables later to use it.
refactor: to placate PerlCritic
Read from <STDIN>, not from magical <>
GerritChangeId: fix ChangeId calculation
Supress spurious warnings during tests

The Git::Hooks::CheckLog::_spell_checker was generating spurious
warnings during my tests on Windows.
Produce better error messages during tests

I can't be sure of the error that caused 'require Git::More' to
fail. It's better to pass the actual error to the user.
Make sure to use a proper Error module

Since Git will use Error, it's better to let it use one that is
compatible with it. So, I moved the 'use Error' clause after requiring
Git.
Use absolute paths where appropriate in test infrastructure

I was using relative paths in two places where it's better to use
absolute paths, since we can calculate them.
perlcritic: use quotes around here-document mark
Fix git command error detection
Show exit code of failed git command during tests
Make it easier to debug tests

I'm simply inserting the test name in the commit messages used in the
tests so that I can more easily see from which commit came which
message in the debugger.
Git::More: fix config grokking on Windows

The Git module isn't as well supported on Windows as it is on Unix. In
particular, the Git::command* functions don't cope well with changes
in the global $/ after they're called and before the command output is
read. Here I localize $/ before invoking the Git routine.

I also substitute Git::command for Git::command_output_pipe in
get_config to make the code simpler.
Signal that we don't support external hooks on Windows

External hooks need better support from the Git module because some of
them (e.g. pre-receive) need to be passed information via stdin, which
is not supported by Git::command* routines yet.
Support Windows by invoking hooks indirectly

It's difficult to use a Perl script directly as a hook on Windows
because of the way that system (mis-)handles the shee-bang. Also,
since Windows don't support symlinks it's not possible to configure
hooks the way we do on Unix.

So, here I configure each hook as a sh script which invokes the Perl
script indirectly.

I do this in the test framework but I don't document it, as we're not
officially supporting Windows yet.
Avoid spurious messages on Windows tests

On Windows, if I invoke a shell script directly via system() I get a
login shell which usually prints the motd file when it starts. In
order to avoid that, I now invoke the sh binary directly, passing the
script file as an argument to it.
Support Windows on CheckJira tests

The Git module on Windows doesn't support being fed via stdin. So,
here I insert the input in a file and make the command get it from
there.