Improve {lib,}jvm.{so,dylib,dll} loading
For discussion: In the Anaconda Distribution (on Linux), we cannot set LD_LIBRARY_PATH and also want to have as dynamic a Java configuration as possible (various Java implementations are available). On Windows we augment PATH before attempting to load the rJava DLL.
Use the values from Makeconf to find java (Unix), falling back to JAVA_HOME (which is needed on Windows). Add the directory to PATH on Windows or dyn.load the shared library it on Linux. macOS is kept largely the same as it was except we check Makeconf before JAVA_HOME.
I hope this doesn't break lot of other things and that the approach is acceptable. I should state, I'm not much of an R programmer and so would welcome any and all feedback.
Can you provide any feedback @s-u?
(I am now aware that Windows doesn't use this codepath btw)