Apply results of running 'python-modernize'.

As well as additional fixups on the way toward "stradding" Python2 / Py3k.