jni: use a define for JNI_VERSION

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
jni: factorize attach/detach thread and get_env

add jni_attach_thread, jni_detach_thread, jni_get_env in libvlcjni.c.

A name should be specified when a thread is attached to Java. Art (on
android-L) was warning us about. jni_attach_thread call AttachCurrentThread
with a JavaVMAttachArgs containing JNI_VERSION and THREAD_NAME.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
jni: myVm can now be static

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>