BUG: groupby rank computing incorrect percentiles
- [x] closes #40518
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry

Built on #40546, is a relatively minor change after that.
lgtm. can you merge master and ping on greenish > lgtm. can you merge master and ping on greenish

@jreback greenish thanks @mzeitlin11 