Added filteredCount and filteredSum functionality to TimeSeriesCalculator
Refactored to remove duplicate code. Kent Beck would be proud.
TimeSeriesCalculator now includes groupBy support