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
Amend link to river level visualisation.

The Heroku app is down. Link to blog post until we decide whether to fix  it.
Merge pull request #799 from alphagov/chore/remove-broken-prototype

Amend link to river level visualisation
Add in a licensing stub so it will show up on services list

- This is for migrations
- Won't be used to actually show us licensing, that's handled by limelight
- Fixes #79443976
Merge pull request #800 from alphagov/licensing_stub

Add in a licensing stub so it will show up on services list
Add LAA Civil claims applications dashboard config
Update SLC dashboard - user satsfaction and cost per trans modules
Remove licensing hardcoded to services list

- Otherwise we'll end up with two in the services list when we've run the json migrations
Add an empty modules array

Migration script requires dashboards to have modules as a key within the
json
Merge pull request #803 from alphagov/add-empty-modules-array-to-licensing-stub

Add an empty modules array
Merge pull request #804 from alphagov/remove_hardcoded_licensing_from_dashboards

Remove licensing hardcoded to services list