Consolidate nth / last object Groupby Implementations
- [X] closes #19569
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Depending on what goes first between this and #19481 some merge conflicts will need to be cleaned up