Fix groupby any/all on an empty series/frame
- [x] closes #45231
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them

Confirmed this issue did not exist on 1.3.x, so no whatsnew entry necessary.
@meeseeksdev backport 1.4.x thanks @rhshadrach  Something went wrong ... Please have a look at my logs.