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.
What about putting the `extend`'s together to make them easier to find?