Fixes #7307 - Refactor errata/package/package group APIs

Original task was to add missing params to the package group API but noticing some similarities among packages/errata/package groups APIs, I made the code more DRY as well.
I got this from [the taxonomies module in foreman](https://github.com/theforeman/foreman/blob/develop/app/controllers/concerns/api/v2/taxonomies_controller.rb#L2-L13). I tried moving both `extend` calls above the `included` block but then I got:

```
wrong number of arguments (0 for 1)
apipie-rails (0.2.4) lib/apipie/dsl_definition.rb:353:in `included`
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:19:in `&lt;module:RepositoryContentController&gt;&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:15:in `&lt;module:Concerns&gt;&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:14:in `&lt;module:Katello&gt;&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:13:in `&lt;top (required)&gt;&#x27;
```

When I moved both after:

```
wrong number of arguments(0 for 1)
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:16:in `included&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:16:in `&lt;module:RepositoryContentController&gt;&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:15:in `&lt;module:Concerns&gt;&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:14:in `&lt;module:Katello&gt;&#x27;
/home/dadavis/Projects/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:13:in `&lt;top (required)&gt;&#x27;
```

Looks like it needs to be this way.