cache total word counts per category

Ref: https://github.com/cardmagic/classifier/pull/15