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`


Could you please add some comments within this method to explain the algorithm flow?