Rename count > _count, pull nested_merge to module

@robyoung
@gtrogers
Factor nested merge into two methods
Change _count to count total docs,add _group_count

@robyoung
@gtrogers
Add a basic migration for adding _week_start_at

This loads all documents that do not have a _week_start_at field and
adds it. This is required for the periodic grouping.