reports: add support for aggregate functions

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
reports: implement grouping for dimensions

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>