Implement setData, notFound and loading code as before hooks.

- This allows upstream hooks to essentially override the default behavior.
- The before hook run order is:
   1. User defined hooks
   2. autoRenderLoadingTemplateHook
   3. setDataHook
   4. autoRenderNotFoundTemplateHook