Operator contrib math

Operators of contrib-math

Issue #1060

I only changed the average code to operators, left the sum and min/max as they were. Renamed files to operator.