m4/check_java_version.m4: Fix variable, if multiple jni_md.h present in system
java/Makefile.am: Use convenient INCUBATOR_{LIBS/CFLAGS} variables
modules/java: Fixed include guards
modules/java: Fixed segfaults, when destination not inited properly but then deinited.

For example, during a config error.
modules/java: Java test destination init() should not fail.
modules/java: Fixed license issues
java-dest: do not try to attach in case of threaded(no) option,

without this patch the java destination goes into deadlock.

Signed-off-by: Juhász Viktor <viktor.juhasz@balabit.com>
m4/check_java_version.m4: Only use one libdir, if shared object found in multiple directories.
travis: Install java for travis