Refactor hook handler
Refactor hook handler

Logging to a file is only one of the possible actions that could be
taken by the hook handler. That behavior is now extracted to a separate
struct.

danesparza/rehook,creativepsyco/rehook,creativepsyco/rehook,danesparza/rehook,danesparza/rehook,creativepsyco/rehook,jstemmer/rehook,jstemmer/rehook