XD-906: Refactor aggregate counter resolution.

Create an enum for the package and use this in preference to Joda
DateTimeField. We don't need any of the latter's functionality
anymore and it can't be used for months or years.