Add tests for flatten parameter
Add new 'flatten' parameter
Rename sort_all() to sort_subgroups()
Change timeseries() to use itertools.groupby

This is necessary so that we can work with flat as well as nested data
Add FlatData, PeriodFlatData classes and flat_merge()

These mirror their grouped/nested counterparts. It should be relatively
straightforward to strip out the grouped/nested code in the future when
Backdrop changes to only return flattened responses.
Remove duplicated branch test
Add docstring to flat_merge()
Test to replicate error auto iding timestamps
Fix for ordering - fixes error of auto ids from datetimes

if timestamps strings are converted to datetime before the auto id step runs then this step blows up.
Merge pull request #348 from alphagov/consistent-write-errors-refactor

Consistent write errors refactor
fix pep 8
Merge pull request #346 from alphagov/flatten-response

Add the ability to return non-nested responses
Merge pull request #349 from alphagov/fix-pep8

fix pep 8