Setup flake8 and fix all style issues

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>