pybind: Add Python 3 support for rados and rbd modules
Python 3 explicitly distinguishes between strings (which can contain any Unicode
character) and 8-bit byte strings. This means that we must explicitly encode and
decode strings that use C-style char* string APIs.
Functions that take a true-strings now have their values encoded to UTF-8 before
being passed to the C API, while functions that accept binary data only accept
the bytes type. To help with this the `cstr` helper function has been introduced
as a way of easily a string into a C-string compatible form.
There is also a number of general Python 3 compatibility fixes:
- dict.iteritems() is replaced with just dict.items()
- xrange() is replaced with just range
- Iterators now use the __next__ magic method
- zip() and map() now return iterators, rather than lists
- print() is now a function
- contextlib.nexted() is replaced with multiple manager with-statement (from Python 2.7)
This also required updating of the unit-tests for these modules, mostly due to
explicitly distinguishing between strings and byte strings.