Extract chart value object

This simplifies the views (slightly).
Extract duplicated query

This includes a bit of a simplification which assumes that there aren't
any orphan taggings for a user.
Merge pull request #159 from kytrinyx/charts

Extract chart value object
Merge pull request #160 from kytrinyx/tag-counts

Extract duplicated query from stats controller