Somewhat reorganised set-hooks to have the same syntax as set-option and
similar error messages. Also added a missing free(cause) and
cmd_list_free().
I changed the name member of struct hook to be const char * which is
better (I know it struct option it is just char *, that could change too
maybe
This adds an implementation hooks using a RB tree to store the name of the
hook and the command-list it uses. These will be accessed via commands to
add/remove hooks.
---
Makefile.am | 3 ++
cmd-set-hook.c | 98 +
cmd-show-hooks.c | 69 ++