DEPR: disallow mutating operations in groupby.apply
A common issue [citation needed] comes up in groupby.apply when a user passes a function that modifies its argument in-place.  This is because we call the function on the first group first to see if we can use a fastpath, and then again when we apply it to all groups.

We could add a kwarg to specify if a function may mutate its data, e.g. `gb.apply(myfunc, may_mutate=True)` in which case we could avoid re-calling the function (probably means no fast-path).  With `may_mutate=False` we could use a context in which we set the data's flags to be immutable before calling anything on it.
