Name change stats to reduce

R/stats.R -> R/reduce.R
src/stats.cpp -> src/reduce.cpp