Fixing group by on .week and .year

When a user changes the case of their username it should group properly now when using .week and .year
Merge pull request #105 from rootcoma/fix_stats_groupby

Fixing group by on .week and .year