Move to Python3

Most of the changes have been made by 2to3. Some manual fiddling was
needed to make sure we're calling python3 instead of just python in the
tests. Two of the helpers in the tests were reworked into proper methods
rather than partials because we had to convert their returned value to
str and this seems like the most straightforward/easy-to-read way.

Change-Id: I74fdc1eaade3c026ee0c3e6bcdf26f8840f259b3
5 files changed