pep8: fix up various whitespaces

This clear out trailing whitespaces, adds double newlines before class
definition and some other trivial spaces changes.

Change-Id: I78c509575cbf6616e86308a1df89280b116aa39e