Add period=week functionality to read API.

What this lot does:

- Separates the tests around mongo into unit and integration tests.
- Pulls out a repository class to handle talking to mongo and as a facade for rolled-up multi key group queries.
- Tags all incoming data that has a `_timestamp` with a `_week_start_at` tag
- Uses the `_week_start_at_tag` to group data by weeks when the period=week query is performed
- Allows group_by=something to work in combination with period=week