Fix Aggregation of empty metric results

When a metric that runs daily (like new register users)
does not return any results the agreggation step fails.

Relatedly, when a wiki level cohort runss through the system, the metric
and cohort service were not treating the group_by_project logic
correctly.  This has also been fixed with a test to prove it.

Bug: 66439
Change-Id: I9d4f3250760b9b3a3dc60849dd88e21148d024a7