Find{Java,JNI}: refactor Windows registry query, lint
- Fix indenting to 2-spaces
- use modern foreach() syntax
- for Windows, use
cmake_host_system_information
instead ofexecute_process
to query registry. These were the last two places in CMake modules using execute_process to query the registry.