include more events in category events

Add support for proposal events (including comments) and one level of
page nesting.
mv category events query to helper function
refactor: split subqueries and better names
Merge pull request #896 from xi/feature-category-proposal-events

category proposal events