Migrate to flake8.

Fixes bug 1172444

Change-Id: Ieca721663aea2fd31753df4abfb5b01a7145b26a
Migrate to pbr.

Fixes bug 1179007

Change-Id: Ief74b121dcad28bb1c2b6044ef72e0cbd51e8f65