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
Alternatively, the test case you have added to notifications_and_subscriptions_spec.rb is also sufficient, so you could do the same thing here.