Move version checking from Make into soong_ui

When kati keeps state around, it has to regenerate the ninja file every
time the state is changed. So move the java version checking into
soong_ui, where we can parallelize it with other operations instead of
only checking it occasionally.

Bug: 35970961
Test: Put java7 in PATH, m -j
Test: Put java8-google in PATH, m -j
Test: Put a space in TOP, m -j
Test: OUT_DIR=<case-preserving fs> m -j
Test: OUT_DIR=<path with space> m -j
Test: DIST_DIR=<path with sapce> m -j
Change-Id: I3245c8dd6d856240d17d54cb05d593dc9df71a27
diff --git a/ui/build/Android.bp b/ui/build/Android.bp
index d44c112..7a83684 100644
--- a/ui/build/Android.bp
+++ b/ui/build/Android.bp
@@ -25,6 +25,7 @@
         "context.go",
         "environment.go",
         "exec.go",
+        "java.go",
         "kati.go",
         "make.go",
         "ninja.go",