Switch to using options, as with newer module definitions

- Also allows easier extension of existing objects within the option set
Switches single-timeseries to using flat data
Change completion rate to work with flat data

 - re implement based on flattened data structure
 - do this and explicily match on start date rather than relying on
   order we unflatten data in - concerned this would not match the order
   it comes from backdrop
 - branches for flat and unflat data remain - needs clearing up when we
   are happy with flat data working
Merge pull request #848 from alphagov/feature/flat-data-for-completion-rate

Change completion rate to work with flat data
Merge pull request #849 from alphagov/feature/flat-data-for-single-timeseries

Feature/flat data for single timeseries
Consistent usage of moment add and subtract

In later versions they’ve deprecated the signature (period, number) so
following that guidance.
Upgrade moment dependencies

These showed up as sufficiently slow when profiling that I was
concerned. This is probably the headline change.

https://github.com/moment/moment-timezone/commit/803d2e2e936acf79b709ee5b5bb584cccd58e460
Allow overriding of flatten.

Flatten is currently problematic for some modules when
backdrop has to fill in lots of empty permutations. In
this case we should be able to turn flatten off.
Merge pull request #850 from alphagov/performance

Various nudges to improve HTML response times
Fix bug in flat data for completion_rate module

This completion_rate does not support the case where multiple pieces
of data are used in the compilation of a single data point representing
a given time period.

Additionally, this module would sometimes result in duplicated output
in the table that accompanies a graph, for example on 'SORN':

    1 to 30 November 2013                    123%
    1 to 30 November 2013                    123%
Merge pull request #851 from alphagov/flatten-override

Allow overriding of flatten.
Merge pull request #852 from alphagov/bugfix-completion-rate-flat-data

Fix bug in flat data for completion_rate module
Use the column module and just extend from that.
Only display the label for days if it's an integer.
Add valueAttr to the application module
first-of-type is hateful.
If we want multiple rows of cols3 we're going to need to add a first so we can clear the margin.
It would work if we had more nesting but meh.
Headline figure view.

Server side view that uses a percentage volumetric.

This is just an extension of the target view but modified to just show percentages of achieved targets.
Updated rendering for headline-figure
Merge pull request #834 from alphagov/feature/headline-figure-module

Headline figure module
Switch everything to use flatten=true parameter

We were down to the last module as part of the switch over to flat
group_by data, so I migrated the addition of the flatten=true query
parameter from each individual module/collection into the data source.
This should make pulling it a little easier and ensures that all
requests will have this parameter provided (as everything uses
data_source).

This maintains the ability of a particular module to override this query
parameter as it as the json from stagecraft and any custom query
parameters get merged over the top.