Include more info in the meta/stats endpoint.

The meta/stats endpoint returns aggregated downloads
count for the last day, week and month.
It also includes both the stats for the specific
entity revisions and the stats for all revisions of the
requested entity.
How about making prefix an argument to this function? Then aggregatedStats becomes a useful general purpose function that can be used for any stats, regardless of their type, and doesn't need to know about the format of stats keys.