py3: Miscellaneous fixes
* Use base64 from oslo_serialization
* Use six.BytesIO instead of StringIO
* Use sys.maxsize instead of sys.maxint
* Use sorted with a key argument to sort by
* Use range instead of moves.xrange or xrange
* Use floor division instead of float division
* Use 'r+' to open a file than 'rw'
* Use six.int2byte instead of chr
* Stop using conn.strict in response_class()
* Tests: Only compare length for bytes, not assertRegex
These changes are tested here: I3a1dfde76009cbac1d419e0ff3f1d20c4a2e99c3
Change-Id: Iab9c23e497956e45c5d04a3d6513acf1b026aafb
22 files changed