Enable undefined-loop-variable pylint check

This required a trivial refactor of two existing cases in the codebase.

These two cases were perfectly correct, but the check uncovered a 3rd
case which was a real bug (fixed separately).  The new versions also
make it clear that if the loop fails to break early then the 'result' is
None (and thus an error) and not simply the last element.  On balance,
it's probably worth enforcing this small inconvenience to coding style.

Change-Id: I780a95241f1454c6886d91f980eb9ada7678a119
Related-Bug: #1362466
Removed python2.6 rootwrap filters

We drop support for python 2.6 in Kilo, so those filters are not needed
anymore.

Change-Id: I8f1e346916701cab5d19044c24801e19500e713c
Merge "Removed python2.6 rootwrap filters"
Merge "Enable undefined-loop-variable pylint check"