BUG in DataFrameGroupBy.rank raising an obscure TypeError
Fix issue #11759

Two things:
1. `Series.rank` and `DataFrame.rank` have been moved to `generic.py` and get the same signature [done with PR #11924]
2. It can happen that aggregate functions are applied to grouped object in a recursive way. Instead of raising a plain `ValueError` when that fails, and catching it afterwards indistinctly, I propose to raise an `_ErrorContainer` exception containing the last meaningful error to have been raised. Thus, when everything else has failed, we can still recover a meaningful exception and throw it back at the user.
