Allow filtering by group_id in more endpoints

All endpoints that return lists of threads (except the endpoint used by
the notifier component) now allow filtering by group_id and are tested
accordingly.