Add standard pep8 checks and fixed pep8 violations

This patch enables tox's pep8 checking using flake8.

This patch also cleans up all the pep8 violations in the
client code and the test code.

Change-Id: Ic49d6f93c19b1af7d8ee61020351c5fd439fdb04