reuse stats impl from other classes

not as performant but less code
reducer that fist a line f(x)=a*x+b to an array of values
implement agg structure for metric reducers to allow arbitrary aggs as input

missing still:
- use multiple buckets paths
- use x,y