Clean up action_hook registration

The middleware stack can now be safely hooked to many actions as it is
executed only once.