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
We recently discovered that mongoid-generated queries do unexpected / undesirable things when they are built up incrementally using symbol operators (e.g. `{:group_id.in => group_ids}`) and that this behavior can be avoided by using the DSL methods e.g. `.in({"group_id" => group_ids})`.  Tests will probably fail upon merge unless this is changed to use that syntax.