XD-908: Query aggregate count by number of points

Adds extra query methods to the AggregateCounterRepository which takes
to query by the number of points required. One method takes a date and
returns points prior to that, the other takes just the count and 
resolution and returns the points from the current time.