DOC: more consistent flake8-commands in contributing.rst
After #23707, I was looking at the rendered results in https://pandas-docs.github.io/pandas-docs-travis/contributing.html#id54, and noticed some inconsistencies:

* the linux commands use `git diff master` as opposed to `git diff upstream/master`; this is also in contrast to what's in the PR template
* the windows command does not match `.py` (because the command was getting long)
* we're already matching filenames directly as a parameter to `git`, which makes it redundant to pipe to `grep`.

This PR proposes to harmonize those things. Sorry I overlooked them in #23707.
