Add some unit tests for Total

Also make it normalize the total_on dates like Hit does.
Extract logic for rendering stack graph out of view

Some we extract into scopes and methods on the Total models, we expose that via WeeklyTotalData objects.  Some we extract into helper methods for rendering the charts.