java plugin: Implement a reference counter for the JVMEnv pointers.
This way one thread entering the Java plugin twice, e. g. with the
following call-chain, will not detach itself from the JVM before it is
completely done with it.
The problematic situation is:
-> cjni_read
-> ALLOC JVM
-> `Read' (in Java)
-> `DispatchValues' (in Java)
-> plugin_dispatch_values
-> cjni_write
-> ALLOC JVM (this is a no-op!)
-> `Write' (in Java)
-> DEALLOC JVM
This last dealloc is prematurely, because the thread is not done with
the JVM yet: It'd like to continue and return from `DispatchValues' to
execute some more Java code..