add hook methods to TridentOperationContext

This would allow adding hooks to e.g. tasks that include a Trident function. There's a bit of a disconnect since the task that has the hook will likely be running e.g. more than a single function. So ideally perhaps there would be another Trident-specific hooks API. Regardless, I think having task-level hooks might be useful, and it is very simple to support.