Add jni and jni_md for Win32|Linux|Mac

The jni.h comes from Mozilla, who has a LGPL|MPL version.
The jni_md.h have been rewritten.
Modify buildsystem to use the current jni/ folder
configure: denser syntax
Win32 mutex: use static inline instead of macros
Add java arch for arm