Added pre-commit-config.yaml
Closes #23616 

The trickiest part is probably ensuring that the configuration works on as many machines as possible. Can people try this out locally and let me know if / how it works?
Just saw https://github.com/pandas-dev/pandas/pull/27233