Fix shifting of flat data queries on boundaries

If there is a query parameter `start_at`, the Query will have a positive
delta. If `end_at` is used, the Query will have a negative delta.

In first_nonempty(), when we have a negative delta we get a first
nonempty index which is negative. The grouped version of this class
searched for the closest point across all of the groups ignoring
direction by using abs() as a parameter to min() -- which means that
min() sorts by running values through abs(), but returns the original
non-absolute value.

By including an abs() in PeriodFlatData, we were losing information
indicating the direction of shifting the data.

This bug manifested itself by providing an end_at query parameter
and a duration across a boundary where data ended, and resulted in
no data being returned for that query.
Add support for group_by permutations to data fill

For a given set of group_by parameters, output all possible
permutations and populate these with data values. If a value
does not exist for a given permutation, the value will be default.
Update tests for new group_by flattening scheme
Remove time shifting from flattened queries

Time shifting is hugely confusing and doesn't provide enough value
to survive. Get rid of it for flattened queries.
Merge pull request #369 from alphagov/bugfix-flat-data-shifting

Return group_by permutations for flattened data
Pass client_id through to user.json

Signonotron2 requires you to pass the client_id through to the user.json
endpoint so that you can't use any apps token to gain access.

https://github.com/alphagov/signonotron2/blob/a2b3326de954300911d984aa1d191c71700846e9/test/integration/api_authentication_test.rb#L18
Merge pull request #370 from alphagov/feature/signon-client-id

Pass client_id through to user.json