Build Linux and the Linux driver out of tree

Linux and the Hafnium module have been built inside their source tree so
far. The targets have a hardcoded toolchain but they get built multiple
times, once for each toolchain defined in GN. This can cause the build
to fail when two instances attempt to compile the same file at the same
time. Refactor the build scripts to compile the kernel and the module
in the out/ directory of each corresponding toolchain.

This cleans up the build files a bit but also introduces a new problem.
Out-of-tree kernel modules do not support building out of their folder.
This patch avoids that by copying the source files into
`target_out_dir`.

Test: kokoro/ubuntu/build.sh
Change-Id: I6fc10ebd9623f5f82dd086447b80d935c490765e
diff --git a/test/linux/BUILD.gn b/test/linux/BUILD.gn
index 0c8a9c6..57ea451 100644
--- a/test/linux/BUILD.gn
+++ b/test/linux/BUILD.gn
@@ -27,14 +27,16 @@
 
 linux_initrd("linux_test_initrd") {
   testonly = true
+
+  # Always use the aarch64_linux_clang toolchain to build test_binary
+  test_binary_target = ":test_binary(//build/toolchain:aarch64_linux_clang)"
   sources = [
-    get_label_info(":test_binary(//build/toolchain:aarch64_linux_clang)",
-                   "root_out_dir") + "/test_binary",
-    get_label_info("//driver:linux", "target_out_dir") + "/linux/hafnium.ko",
+    get_label_info(test_binary_target, "root_out_dir") + "/test_binary",
+    get_label_info("//driver:linux", "target_out_dir") + "/hafnium.ko",
   ]
   deps = [
-    ":test_binary(//build/toolchain:aarch64_linux_clang)",
     "//driver:linux",
+    test_binary_target,
   ]
 }