Move all statistics related tests into the statistics module

This module is deprecated, so keeping the tests together makes it easier to 
ignore the deprecation warning during the tests (which otherwise raises an 
error).