Build ONOS exclusively with Bazel-provided remote JDK

This change make it possible to build ONOS in a host system without JDK
installed, or ignoring the one installed, instead relying exclusively on
the "remote" JDK provided by Bazel. The JDK version, along with the
toolchain configuration (language source and target values), are checked
in as part of the build files (tools/build/bazel/BUILD), thus enabling
deterministic builds that are less dependent of the host environment.

To allow this, this change replaces all references to JDK-related tools
expected to be on the host PATH, such as the jar command, with their
counterpart from the remote JDK (now a sandboxed relative path). This is
achieved by:

  * Creating a new "jdk_genrule" macro that exposes the remote JDK bin
    directory to the PATH visible by the genrule command. This is used
    for all genrule targets invoking for example `jar`;
  * Modifying custom Starlak rule implementations by replacing
    invocation to JDK tools with a path from the remote one.
  * Renaming the onos/lib directory to onos/deps as it clashes with
    the Bazel-provided JDK's lib directory (that for some strange reason
    is resolved on the ONOS workspace)

Finally, this change is reflected on the Dockerfile which now builds
ONOS from an Ubuntu image with no JDK installed.

Change-Id: Ie7d990cfce6fef00ddb4ffffe4c6205b8530fb47
diff --git a/protocols/grpc/BUILD b/protocols/grpc/BUILD
index 3fa5169..ed61365 100644
--- a/protocols/grpc/BUILD
+++ b/protocols/grpc/BUILD
@@ -3,17 +3,17 @@
     "//protocols/grpc/ctl:onos-protocols-grpc-ctl",
     "//protocols/grpc/utils:onos-protocols-grpc-utils",
     # gRPC dependencies (with patched core)
-    "//lib:io_grpc_grpc_api_context",
-    "//lib:io_grpc_grpc_core_internal",
-    "//lib:io_grpc_grpc_core_inprocess",
-    "//lib:io_grpc_grpc_core_util",
-    "//lib:io_grpc_grpc_core_perfmark",
-    "//lib:io_grpc_grpc_stub",
-    "//lib:io_grpc_grpc_netty",
-    "//lib:io_grpc_grpc_auth",
-    "//lib:io_grpc_grpc_protobuf",
-    "//lib:io_grpc_grpc_protobuf_lite",
-    "//lib:com_google_protobuf_protobuf_java",
+    "//deps:io_grpc_grpc_api_context",
+    "//deps:io_grpc_grpc_core_internal",
+    "//deps:io_grpc_grpc_core_inprocess",
+    "//deps:io_grpc_grpc_core_util",
+    "//deps:io_grpc_grpc_core_perfmark",
+    "//deps:io_grpc_grpc_stub",
+    "//deps:io_grpc_grpc_netty",
+    "//deps:io_grpc_grpc_auth",
+    "//deps:io_grpc_grpc_protobuf",
+    "//deps:io_grpc_grpc_protobuf_lite",
+    "//deps:com_google_protobuf_protobuf_java",
     "@com_google_api_grpc_proto_google_common_protos//jar",
     "@com_google_errorprone_error_prone_annotations//jar",
     "@com_google_auth_google_auth_library_credentials//jar",
diff --git a/protocols/grpc/api/BUILD b/protocols/grpc/api/BUILD
index 3247fcd..8b1157e 100644
--- a/protocols/grpc/api/BUILD
+++ b/protocols/grpc/api/BUILD
@@ -1,3 +1,3 @@
 osgi_jar(
-    deps = CORE_DEPS + ["//lib:io_grpc_grpc_api_context"],
+    deps = CORE_DEPS + ["//deps:io_grpc_grpc_api_context"],
 )
diff --git a/protocols/grpc/ctl/BUILD b/protocols/grpc/ctl/BUILD
index 77239e4..b81258f 100644
--- a/protocols/grpc/ctl/BUILD
+++ b/protocols/grpc/ctl/BUILD
@@ -1,10 +1,10 @@
 COMPILE_DEPS = CORE_DEPS + [
     "//protocols/grpc/api:onos-protocols-grpc-api",
-    "//lib:io_grpc_grpc_api_context",
-    "//lib:io_grpc_grpc_core_internal",
-    "//lib:io_grpc_grpc_netty",
-    "//lib:io_grpc_grpc_protobuf_lite",
-    "//lib:com_google_protobuf_protobuf_java",
+    "//deps:io_grpc_grpc_api_context",
+    "//deps:io_grpc_grpc_core_internal",
+    "//deps:io_grpc_grpc_netty",
+    "//deps:io_grpc_grpc_protobuf_lite",
+    "//deps:com_google_protobuf_protobuf_java",
     "@com_google_api_grpc_proto_google_common_protos//jar",
     "@io_netty_netty_handler//jar",
 ]
diff --git a/protocols/grpc/utils/BUILD b/protocols/grpc/utils/BUILD
index c3e6e77..2627aad 100644
--- a/protocols/grpc/utils/BUILD
+++ b/protocols/grpc/utils/BUILD
@@ -1,6 +1,6 @@
 COMPILE_DEPS = CORE_DEPS + [
     "//protocols/grpc/api:onos-protocols-grpc-api",
-    "//lib:io_grpc_grpc_api_context",
+    "//deps:io_grpc_grpc_api_context",
 ]
 
 osgi_jar(