Bug/subgroup proposals

Fixed [this bug](https://trello.com/c/7pcpbxQN). Refactored queries from the `Discussion` model into a new `DiscussionsQuery` class using the [Extract Method](https://gist.github.com/4346010) pattern.

There's still a few more queries which need to eventually make their way into that class.