Fix remote execution of r8 and d8 in make

1. The location of the r8.jar and d8.jar files was no longer correct.
2. $(JAVA) was not defined before rbe.mk was included.
3. $(JAVA) includes options, which much be stripped to be a rewrapper toolchain input.

Test: ran against an RBE cluster with RBE_D8_EXEC_STRATEGY=remote and RBE_R8_EXEC_STRATEGY=remote

Change-Id: Icf434f5c0fda687c70c75b01b0bfd63bcd8cc474
diff --git a/core/config.mk b/core/config.mk
index f5bb7ef..025a3a1 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -431,6 +431,9 @@
 $(hide) $(HOST_NM) -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true)
 endef
 
+# Pick a Java compiler.
+include $(BUILD_SYSTEM)/combo/javac.mk
+
 ifeq ($(CALLED_FROM_SETUP),true)
 include $(BUILD_SYSTEM)/ccache.mk
 include $(BUILD_SYSTEM)/goma.mk
@@ -453,9 +456,6 @@
   WITH_TIDY_ONLY :=
 endif
 
-# Pick a Java compiler.
-include $(BUILD_SYSTEM)/combo/javac.mk
-
 # ---------------------------------------------------------------
 # Check that the configuration is current.  We check that
 # BUILD_ENV_SEQUENCE_NUMBER is current against this value.