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.
fixes for jshint
Refactor get_dashboard_and_render to expose buildstagecraftapiclient

This allows testing without messing with the initialize method. This
stops an asynchronous fatal error which was causing tests to error even
if all tests pass.
Fix tests for request id.

Following a rebase tests are breaking. We need to add in request id
stuff to service and get_dashboard_and_render tests.
Fix stagecraft-stub url construction to be consistent

process request never had a trailing slash. It got the trailing slash by the way it constructed the url in set path. This fix should make things more consistent by having the no slug path default to /dashboard rather than dashboard
Merge pull request #796 from alphagov/get-ye-service-list-from-stagecraft

Get ye service list from stagecraft