Stats refactor 2

Another pull request in an ever exciting adventure to clean up the stats module. 

This builds off of https://github.com/sympy/sympy/pull/1806 and https://github.com/sympy/sympy/pull/1811 .  Those should be reviewed first.