Properly handle namespaces in +o code generation

Nested namespaces were copied verbatim instead of applying namespaces nested as is done in the JNI generator.
Apply C++ namespace to return types of +o proxies