Add the ability to query multiple group ids

Following the PR for workgroup cohorts (https://github.com/edx/edx-platform/pull/4364), this PR is to add the ability to query multiple group ids through the API.

Please, do a careful code review. I know a very little of ruby so I might be doing some bad practices.

Le me know if you have any question. CC @gwprice @jimabramson @antoviaque @martynjames
I think this would read more cleanly as

```
if group_ids
  comment_threads = get_group_id_criteria(comment_threads, group_ids)
```

This would avoid the need for the empty check in get_group_id_criteria.