bpo-29919: Remove unused imports found by pyflakes (#137)

Make also minor PEP8 coding style fixes on modified imports.
40 files changed