Use an enum for the hook type

This should have been done earlier. Took a while for me to realise that my
"hookid" for the low level mouse hook was wrong and I was trying to set a
journal hook.
Add the gitignore to the solution