libvlcjni: free JNI references

Inside JNI_OnLoad function, macro GET_CLASS leak a JNI LocalRef when the macro
get a GlobalRef and assign it, the LocalRef is lost.

JNI_OnLoad acquire many GlobalRef, but they are not all released in JNI_UnLoad.
5 jobs for !595 with libvlcjni_leak in 43 minutes and 12 seconds (queued for 38 seconds)
detached
Status Job ID Name Coverage
  Build
passed #390155
amd64 debian
build-libvlc-arm64

00:14:03

passed #390156
amd64 debian
build-libvlc-armv7

00:15:46

passed #390157
amd64 debian
build-libvlc-x86

00:15:29

passed #390264
debian amd64
build-libvlc-x86_64

00:13:39

failed #390158
amd64 debian
build-libvlc-x86_64

01:52:57