Fix several issues found by pylint

Includes fixes for:
- bad indentation
- wrong continued indentation
- old-style-class
- bad and trailing whitespaces
- import only what's needed
- unused imports
- unused variables
- superfluous-parens
- multiple-statements in one line
- too long lines

Also included:
- use UNIX instead of Windows line endings
- add .gitignore
Don't know why pylint thinks this is ok, but this actually shows up for me:

    Line: 97  Col: 12  ==> E121 continuation line indentation is not a multiple of four