run git-commit-commit-hook only when no clients exist

Also run it before killing the message buffer.