BUG: GroupBy.apply() returns different results if a different GroupBy method is called first
- [x] closes #34656 
- [x] closes #34271 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

_Behavioural Changes_
_.apply()_
Calls  to `self._set_group_selection` have been replaced with `with _group_selection_context(self):` for `_agg_general`, `_make_wrapper`, and `nth`. 

Previously these calls to `self._set_group_selection` created a bug in `GroupBy.apply` where calling another method before `.apply` would change the output of `.apply`. This bug is now fixed. 


_Tests_ 
One new test is added to check that the output of `.apply` is constant whether another method is called on the same grouper first. 

Two existing tests were actually dependent on the old buggy-behaviour (i.e. they called GroupBy.sum first and then expected that GroupBy.apply(sum) would exclude the index columns from the results). All of these tests have been amended in a manner that enforces the new consistent output format while preserving the existing test. 

Both of the copy-pastable examples in the linked bug-reports are fixed. 