The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8. Note that the repo has been
running hacking 2 for some time due to uncapped setup, and thus fixes
are needed for N350 - the uncapped setup disabled the local hacking
rules. They are now enabled again.
Change-Id: I25e5201933f65ba4d3045e6445f0e6419ea57f3e