Update the module schema to use a data-source

The allOf in the period property on the query-params is needed to get
around the fact that an enum cannot be required=false in our jsonschema
lib. By defining it this way we can force this to work.

Schemas that explicitly required a period have been dropped and in the
case of availability removed altogether as it only added that field.
Migrate config to use data-source parameters

I have written a script that migrates the config
(tools/migrate-config-to-data-source.js), it works by picking out any
parameters which we formally used by the collections (both loose and
inside of query-params).

The script will also try and migrate some of the defaulted or derived
values into the config to be more explicit and decouple the data-source
from other parts of spotlight.
Add in new data source model

This model will receive the standard data-source properties from a
module and generate urls for use in the collection.
Retrofit data sources into modules

We can remove a lot of the queryParam functions as the data-source
parameters in modules now contain the required parameters. This means
they are already known about in the collections rather than needing to
be passed through. Maps are maintain when modules need to collect
specific data.

The period should now be exposed through the collection rather than the
modules delving around in their options.

The realtime module should always cut off at 24 hours, so rather than
storing a phoney period and duration hardcode it.
Only realtime wants to be sorted by _timestamp

This sorts with the oldest record being at index 0, which was breaking a
whole bunch of other collections.
Fix Collection tests

queryId is not a thing anymore so we can just fallback to the Backbone
fetch fn. This also means the tests got nuked. I looked this param up
and it was created in Limelight for some suprious reason involving
storing query parameters based on a query id. We definitely don't do
that anymore.

There was a bunch of duplication in the url tests where it treated
multiple arbitary params differently to params like filter_by. I don't
know why they should be considered differently and they both follow the
same path in the code now, so I killed the tests.
Remove extensions/views/graph/headline

An ack around our project shows that this file is not being used
anywhere, so let's kill it.
Fix Controller tests

The data-group and data-type are now nested inside of a data-source,
update the tests to reflect that.
Fix JourneyCallout tests

This should have been using the correct collection to test against, this
was shown up because the JourneySeriesCollection stores the dataRange it
will request.

A set of axes needs to be defined for the collection to be able to
flatten the data.

We need to shim getMoment so we can fixed what now is so the tests don't
go crazy.
Fix AvailabilityCollection tests

This collection now only exposes a static object of query parameters to
be applied to the url, which are the fields to collect on. We can remove
the tests what were check dynamic query parameter correctness.
Fix ResponseTimeNumber tests

Change options structure to match new dataSource structure
Fix GroupedTimeseries tests

Removed a bunch of tests:
  - GroupedTimseries no longer sets duration and it is now being used,
    because backdrop supports it now
  - again with duration, it was silly having duration calculations in
    two places (backdrop + spotlight)
  - we really don't need to test url generation in every collection now

The rest of the changes are just porting the config, worth noting that
previously GroupedTimeseries would duplicate 'view' config into the
backdrop url, this no longer happens. This means that group_by and
category, and collect and valueAttr are now duped pairs.
Fix JourneySeriesCollection tests

I had to remove the prototype valueAttr so that it could be varied.
Previously if passed in through the config it would not get set because
the base Collection will only set it if there is not a valueAttr
property already set on this.

The dateRange for the collection is now only calculated on init so the
moment munging needs to move to before the use of the constructor.
Fix CompletionRateCollection tests

Do not check the URL generation again! It's all done in one place now so
all of these tests are redundant.

The rest of the changes relate to matchingAttribute, which is no longer
defaulted but defined for all modules.
Fix LineGraph tests

A group_by needed to be added so that the data got flattened properly.
Fix StackedGraph tests

Similarly to the LineGraph, we now need to specify a group_by parameter
in order for the data to be flattened correctly.
Ensure setQueryParam can handle no query-params

We should be able to set a query parameter even if there were none
before that point. This adds some tests for the function and enforces
this behaviour
Fix VolumetricsNumberView tests

How this view interacts with periods has changed, so the way they are
manipulated in the tests had to change too.
Fix UptimeNumberView tests

The collection options needed to be updated to reflect the new
structure.
Fix GroupedTimeshift tests

Remove reliance on Query as it has been nuked and switch to using the
mapping of period to duration stored on DataSource.