Pass Request-Id set by nginx to backends
Merge pull request #794 from alphagov/feature/richer-logstash-logs

Pass Request-Id set by nginx onto backends
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.