Use ccache in GHA pipelines
Saves around 5–10 minutes in each of the GHA builds.

Also cleans up some duplicated code.

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

Hello @jonashaag! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2022-02-28 08:52:23 UTC @jonashaag can you merge main ping @mroeschke  Trying Sccache right now because it has support for Windows/Visual Studio compiler I can't figure out how to tell `build_ext` to use a different compiler for Windows. It always seems to use `cl.exe`. @mroeschke @jbrockmendel any ideas? Awesome, this seems to work great. Awesome, this also works for Windows now. Not yet implemented for Azure pipelines though, so this only applies to the `python-dev` Windows builds. Would like to test this for a few days and then port it to Azure pipelines as well. Looks pretty good! Have you observed pushing a commit a day later and seeing the ccache being rebuilt? I have observed that numerous times while developing this but we can also retrigger this specific version of the PR tomorrow and have a look. There is one important caveat with this PR that I forgot to mention, which is that it currently uses an unmerged version of `ccache-action` (https://github.com/hendrikmuhs/ccache-action/pull/47) can you rebase again (as merged the mamba change). I'm working on an extension of this that also uses Micromamba for env setup (where I recently implemented caching of entire Conda envs). It removes another 5 minutes from the builds. https://github.com/pandas-dev/pandas/pull/46346 Example before, almost 10 minutes for Conda setup + Pandas build
<img width="95" alt="Screenshot 2022-03-12 at 22 46 43" src="https://user-images.githubusercontent.com/175722/158036241-f3acf38f-60a2-463c-adc2-cd5c41af8983.png">

Example after, less than 2.5 minutes for Conda setup and Pandas build (both w/ hot cache)
<img width="93" alt="Screenshot 2022-03-12 at 22 46 50" src="https://user-images.githubusercontent.com/175722/158036242-90b30ce9-bbc1-43a8-b4fc-6ac3eaaba5a3.png">

With hot cache most of the time of the Pandas build is spent during cythonization, maybe we can cache that too.