Make python files almost PEP8 compliant

Except the 80 char line length limit. Boo to that!

Also add flake8 config file. Should setup jenkins job soon.

Change-Id: If49596b9d02c3c631c95f1f6c7cd7b8efca2d7f6