Add some basic test covearge for StatsAggregator

To support a smidge of refactoring
Refactor add_<stat> by making use of defaultdict

Which results in a more readable, shorter code
Get rid of unused constructor parameter
StatsAggregator now inherits from object
Move StatsAggregator to its own file

Also, make the code more pep8 compliant and refactor it a bit to remove
some duplication.