XD-915: Apply to jdbc module
XD-915: Apply to jms source module
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.
XD-906: Add query by month to aggregate counter.

Also changed the test to run across more date boundaries
(e.g. 2013-2014) and fixed some bugs related to this.
XD-906: Add new aggregate options to shell
XD-906: Fix potential NPE in aggregate counter

When querying beyond with day or month resolution beyond
the interval where data is actually recorded, a null value
could be returned from the bucket store and cause a NPE.
This is now checked and an array of zeroes is used instead.: