Convert commands to use prepare()

Hooks need to know the running context of commands so that those hooks run
within the intended client/session/window/pane of the command they're being
run for.
Add man page entry for hooks

This defines a generic HOOKS section, describing a little bit about hooks as
well as the two hooks-specific commands to manipulate/show them.