Add a new toolchain type for c++.  In order to do this, PlatformConfiguration is made a legal configuration fragment for every rule class.

Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used.  Add toolchain mocks to java and shell tests.

PiperOrigin-RevId: 167901210
diff --git a/compile.sh b/compile.sh
index dc414b1..c72a802 100755
--- a/compile.sh
+++ b/compile.sh
@@ -81,7 +81,11 @@
 new_step 'Building Bazel with Bazel'
 display "."
 log "Building output/bazel"
+# We set host and target platform directly since the defaults in @bazel_tools
+# have not yet been generated.
 bazel_build "src:bazel${EXE_EXT}" \
+  --experimental_host_platform=//tools/platforms:host_platform \
+  --experimental_platforms=//tools/platforms:target_platform \
   || fail "Could not build Bazel"
 bazel_bin_path="$(get_bazel_bin_path)/src/bazel${EXE_EXT}"
 [ -e "$bazel_bin_path" ] \