hooks: exit code fix

Fixes problem with hooks exit code, that prevented hooks from aborting the commit.

Hook functions would return ``False`` on failures, and ``None`` on success which would be passed to ``sys.exit()``. Both however result in exit code 0:

```console
$ python -c "import sys;sys.exit(None)" ; echo $?
0
$ python -c "import sys;sys.exit(False)" ; echo $?
0
```

Thus hook functions now return an integer (0 or 1).