Improve use of groups with the GitLab API.

The GitLab API is totally broken with pagination, but if users have a large
number of repositories which are separated into groups, we can do a better job.

This change is based on John Earl's code at /r/5789/, but I've made some
changes to keep things a bit more concise, added a separate error for when the
group name is incorrect, and added and fixed unit tests for everything.

Testing done:
* The original change listed that the groups iteration code was tested against
  a large GitLab installation in both the devserver and production.
* Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5792/