fix bug in Histogram.getMean

also switched it to use delta-mean method to avoid possible overflows
Added unit test for Histogram.getMode
Merge pull request #744 from echeipesh/fix/statistics

Fix/statistics