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.
The class implements multi-value so should we not have this in a for loop to read and write multiple metric names and values? Would this make the stats reducer able to use this stuff too?