re-do user_stats stat finding using defaultdicts
I keep coming back to this, but this way seems possibly slightly
more efficient (doesn't require iterating over results twice) and
more readable, and also doesn't use anything python 2.7-specific.
It does introduce a dep on collections for defaultdict(), but that
seems a pretty standard thing.