Adds range function

- Adds a new aggregation function called range 
- Bugfix in DerivativeAggregator