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
same, a if on a empty array seems to return true. Is that normal in Ruby?