BUG: Preserve Series/DataFrame subclasses through groupby operations
This pull request fixes a bug that caused subclassed Series/DataFrames to revert to `pd.Series` and `pd.DataFrame` after `groupby()` operations. This is a follow-up on a previously abandoned pull request (#28573)

- [x] closes #28330
- [x] tests added / passed
- [x] passes black pandas
- [x] passes git diff upstream/master -u -- "*.py" | flake8 --diff
- [x] whatsnew entry