Python integration tests - flake8 fixes (part 1)

This PR makes `flake8` fixes in about half the main integration tests, the commits are on a file-by-file basis. I have not modified `OmeroPy/test/setup.cfg` and so these files will no be automatically checked by Travis. However, the integration tests on Jenkins should still run and be unchanged barring standard intermittent fails.

To check using `flake8` locally please temporarily move or rename `OmeroPy/test/setup.cfg`.

Note that this PR essentially fixes for `flake8` and a few minor formatting issues. I have left chunks of commented-out code that could probably be removed and I have left several examples of code that should really be fixed to be better `pytest` code.