Add idxmax/idxmin to groupby dispatch whitelist (#5786)

Closes #5786.