[Sprint: 37] XD-2113: Fix redis agg-counter when right of interval on the hour

This does two things:
 * fix, as the heading says. Not sure if the ` || dt.isEqual(end)` part applies to other resolutions
 * optimize and fail-fast in `concatArrays`