Null-terminate strings returned by java_to_utf8()

Although these can have embedded zeros, null-terminating allows to print
them for debugging more easily.
Fixes a typing error: javaclass is not a PyObject!
Clears more Java references
Implements JavaInstance_getattr