CMS-4685 Implement needed metric aggregations

Implemented StatsAggregationQuery
CMS-4700 Extend DateRangeAggregationQuery with format-parameter