Re #7672. Added moment calculations to Kernel/Statistics.

The two methods are getMomentsAboutOrigin and getMomentsAboutMean.
They work for densities and histograms.
Fix loop limit that caused out of bounds error on vector access.

Refs #7672
Re #7672. Refactored according to Michael's comments.
Merge remote-tracking branch 'origin/feature/7672_moment_calc'