Separate stat collection from reporting

Make stat collection itself orthogonal to reporting of stats so tests
can inspect stats without relying on report timing.
Merge pull request #8 from ironcladlou/stats-only-when-enabled

Stats refactoring
wip