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
This test case isn't strong enough; the second response only contains a thread from one of the two groups and a thread with no group_id. I think a better test would be to have three queries, all of which use the same group_ids parameter ("42,43"), setting the group_id of that individual thread to 42, then 43, then 44 (so the last result would only have one result where the others had two).