PERF: support mask in group_last
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

xref #37493

We have existing tests with MaskedArrays for this.
```
ser = pd.Series(range(10**5), dtype="Int64")
df = pd.DataFrame({"A": 1, "B": ser})
gb = df.groupby("A")

%timeit gb.last()
726 µs ± 26 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)  # <- main
527 µs ± 3.88 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)  # <- PR
```

> Also the xref link doesn't seem to exist.

Fixed. sure assume first is an easy followup