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.: