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.