[jnigen] Fix windows specifics and global reference ownership in interface implementation (https://github.com/dart-lang/jnigen/issues/335) Since Dart doesn't know that this global reference is still used, it might garbage collect it via NativeFinalizer thus making it invalid. We're letting Java handle the clean up and use setAsDeleted to detach the native finalizer from the return value in Dart.