Refactor pagination groups

Added `get_groups_links` that returns groups links. It delegates to a common function `get_collection_links` that can be used for policies and webhooks. Used it when paginating groups and it works. Not written tests yet. Removed `get_new_paginate_query_args` and related tests.