Move some functions for deviation computing from MLBase to here

These functions are also quite useful in statistics context. 

Note: MLBase depends on StatsBase, so these functions remain available there.