Category year/month/week stats shouldn't include deleted topics.

Fixes one of the issues expressed in Meta thread: [Year/Month/Week at bottom of Categories is broken](http://meta.discourse.org/t/year-month-week-at-bottom-of-categories-is-broken/1542/8).

* Refactored large query string into AR DSL with pretty much exact same SQL output.
* Introduced `Topic.created_since(1.week.ago)` scope. There are a lot of places where this can be reused.