Get dashboards list from stagecraft and fallback to local config

includes a test refactor of common setup stuff
Extraction of common api client setup and event logic

This can be used in process_request, services and homepage. It returns a
client on which setPath can be called to update data and trigger a
call of the passed in render method and ensures any status coming from
the stagecraft api is passed up in the response.
Switch to use of get_dashboard_and_render. Remove duplicate tests.

I don't know what the set script thing is for. Otherwise this is a
relatively simple completion of moving the api client use logic.
Switch services to use the api client via get_dashboard_and_render

Also ensure a error view is rendered if the stagecraft api errors (501
is a special case used to communicate there is no page-type for the
found dashboard config, not that none was found. /dashboards returns a
501 so we need to ensure no error page is rendered).
Switch homepage to use the stagecraft api client

also includes error page view fallback

I am drawing attention to the lack of tests (and misplaced test) here
also. Happy to fix this, though it will slow things down further,
but just want to draw attention to this first.