Performance improvements to movingAverage and cumulativeSum in Flux