Replace the concept of pre/post task hooks with a single task_hook.