Flake8 fixes of integration tests (rebased onto develop)



This is the same as gh-2317 but rebased onto develop.

----

This PR is mainly intended to fix the test files to pass `flake8`. Running,
```
flake8 -v components/tools/OmeroPy/test
```
should show no errors. 

In addition no tests in the affected directories should not fail beyond usual intermittent fails. Some previously accidentally disabled tests and been enabled - these were leftovers from the move to `pytest` that had gone unnoticed. To run the affected tests, from `components/tools/OmeroPy` the following,
```
python setup.py test -s test/integration/cmdtest
python setup.py test -s test/integration/scriptsharness
python setup.py test -s test/integration/scriptstest
python setup.py test -s test/integration/tablestest
```

The file 740df8b has been fixed for `flake8` but nothing else. @joshmoore since `pytest` is not part of 4.4 any ideas on what we do with this file?