BUG: Avoid ambiguous condition in GroupBy.first / last
- [x] closes #32123
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This comparison `val == val` happens in a lot of these groupby operations but only seems to raise here in the presence of `NA`. Are we just always / mostly converting to numpy beforehand in the other cases?
#31227 turned up a bunch of other places where having pd.NA in columns/index is going to break the world.  the `is_matching_na` implemented there might be useful here @dsaxton can you merge master to resolve conflicts thanks @dsaxton  @meeseeksdev backport to 1.0.x