Fix newline-related PEP8 issues

This changeset resolves 168 PEP8 issues. It addresses the following
newline-related PEP8 violations:
- W292 no newline at end of file
- W293 blank line contains whitespace
- E301 expected 1 blank line, found 0
- E302 expected 2 blank lines, found 1
- E303 too many blank lines
- W391 blank line at end of file

This cuts the total count nearly in half, down to ~174 (as of this
writing).