Enable flake8 F841 checking

This check looks to see whether a local variable
is unused. This change fixed all violators of said check.

Change-Id: Iba4ab2b2a172d0c8b90ba29be33ebb129fce5e6b
Merge "Enable flake8 F841 checking"