Use group_id if present when getting user thread and comment counts.

TNL-543

@jimabramson @dan-f Please review
I'm not familiar with the ruby framework we use here, but we should make sure that this doesn't aggressively load every thread and then return the count of that whole data structure. I know that in django, calling `count()` on a QuerySet uses a SQL `COUNT` rather than `SELECT *`, so we should just verify that the same is done here.