Add a pre-commit hook that checks style

This is just the standard git pre-commit hook, with the added invocation of
the check-style script. To use it, create a symlink named
.git/hooks/pre-commit that points to it.