Fixes JNI global references

All fields of wrapped structures (JavaInstance, JavaClass, BoundMethod,
UnboundMethod) are global references that are cleared by a dealloc
function.