Landscape fixes

Fix some issues highlighted by https://landscape.io/github/python-pillow/Pillow

Things like duplicate imports, naming variables after builtins.