python: fix conversion to string variants.
bindings: Make documentation script work under python 3.x.
C++: Make hardware device instances user owned.