Entirely drop the idea of using Mongo for interrim aggregation storage.
Partition each log file by day, perform aggregation in-memory then insert into Mongo.
Removed a large amount of now-dead code.