Fix context leaks in ActionHooks.

Context.update() implies a push(), but the ActionHooks weren't popping.
This meant that state would be leaked not only between hooks, but into
the main template as well.

We now do a pop() after rendering the template.