CI: share pandas setup steps
Split out from https://github.com/pandas-dev/pandas/pull/39392. Just a refactor; puts redundant setup steps in a shared place.

To be honest, I don't actually understand why different GitHub Actions set up pandas in different ways, so didn't change that here.

The `uses` calls can be moved into the composite actions once https://github.com/actions/runner/issues/862 is complete, DRYing it up even more.

- [ ] ~~closes #xxxx~~
- [ ] tests ~~added /~~ passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] ~~whatsnew entry~~

thanks @afeld 