FindJava, FindJNI: leverage java_home command on Mac (#14689)

Mac has a utility, /usr/libexec/java_home, which returns the currently defined home for the system, similar to setting JAVA_HOME environment variable. Most users have always used the JavaVM.framework provided by Apple, but with Mac OS X 10.9 Apple no longer readily provides one (though a user may have a previous install lingering), but instead prompts users to download and install the latest from Oracle.

To get FindJava and FindJNI modules to work on Mac, you usually have to set JAVA_HOME in the environment first, if you want to use a non-Apple Java install, e.g. Oracle's, even though /usr/libexec/java_home now correctly points to the non-Apple install. Also, if a user installs the Oracle Java, but still has a lingering previous Apple install, FindJNI returns mixed results unless CMAKE_FIND_FRAMEWORK = LAST (FIRST by default).

It is not difficult to determine an Apple Java.framework install, when returned by /usr/libexec/java_home, since they all have a 'bundle' symlink in their root directory, while non-Apple installs do not.

To choose any Java install (including an older Apple install) other than that returned by /usr/libexec/java_home, set the JAVA_HOME environment variable. Available versions can be listed with /usr/libexec/java_home -V.