cache total word counts per category

Ref: https://github.com/cardmagic/classifier/pull/8

/cc @dabble