Branch hook code based on run mode

The run mode is injected into the context of the hook, so the hook code can branch based on run mode.

As an example, you can use 3rd-party test APIs in test mode:

module.exports = async function (payload, actions, context) {
  const api = context.isTestMode ? 
                'https://dev.myapi.com' : 
                'https://myapi.com';

  const { data } = await actions.http.post(api, { a: 1 });
}