add subscriptions option and change waitOn semantics

Issue #819

A new option called "subscriptions" can be used to call subscriptions
before any other action functions are run. The return value is added to
the wait list.

The "waitOn" option is called next. It also adds its return value to the
waitlist but has the added effect of using the "loading" hook
automatically. If a waitOn option is provided, the loading hook will be
automatically appended right before the action function so it will
always be the last "before" hook to run before the action function.