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

TNL-543

@jimabramson @dan-f Please review
This is the same way that the query was done previously (see line 52). I am hoping it was done correctly before.

@jimabramson Can you confirm?