Refactor metric reducers

Try to remove duplicate code for metrics that create single value.
I only make this pull request so you know where this is going.
Could we implement Stats by reusing the classes for the individual operations? Would not be as performant since it would be multiple passes but would it be 'good enough'?