Makefile: fix Git hook directory detection for Git <2.5
Makefile: fix Git hook directory detection for Git <2.5

Git 2.5 introduced a useful `git rev-parse --git-path hooks` command
that, since Git 2.10, takes into account the `core.hooksPath` varible.
This command unfortunately fails with garbage output but a successful
exit code on TeamCity, which runs an older version of Git. The garbage
output contains spaces, which causes Make to print a warning about
"mixed implicit and normal rules", since $(GITHOOKSDIR)/% is used as a
target and Make cannot handle targets with spaces.

So this patch reverts to manually computing the Git hooks directory with
`git rev-parse --git-dir`/hooks, which works on all known versions of
Git.

The more I think about this, the more I think this may have been the
correct behavior all along. The `core.hooksPath` variable applies
globally, so if a user has configured it, s/he probably doesn't want us
installing Cockroach-specific hooks into that directory anyway.

Fixes #14330.

paperstreet/cockroach,paperstreet/cockroach,paperstreet/cockroach,paperstreet/cockroach,paperstreet/cockroach,paperstreet/cockroach,paperstreet/cockroach,paperstreet/cockroach