Switch everything to platforms

This patch switches the codebase over from using the "cpu"
mechanism to using bazel platforms. See
https://docs.bazel.build/versions/master/platforms.html for some more
information.

Most of the substantial changes are in //tools. Instead of using
`cc_toolchain_suite` rules, we now use regular `toolchain` rules that
are registered in the WORKSPACE. That also means that bazel now uses
the target platform to select the compiler.

All --cpu=* arguments should now be --config=* arguments. For example,
`--cpu=roborio` should now be `--config=roborio`. The CI script and
all documentation has been updated to reflect that.

The remainder of the changes revolve around tagging all targets with
`target_compatible_with`.  The old mechanism allowed us to specify
repo-wide defaults. The new mechanism does not. That means every
target that didn't have any compatibility specified, now requires
compatibility with `@platforms//os:linux`.

I used buildozer for the vast majority of `target_compatible_with`
changes. buildozer automatically buildifies any BUILD files it
touches. That means this patch also contains a few non-functional
changes that I was too lazy to remove.

Change-Id: I66d6e6ad9161520ee397597cdb492585820a3acd
diff --git a/.bazelrc b/.bazelrc
index 1e65f3a..65af315 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,7 +1,9 @@
-# Use our CROSSTOOL.
-build --crosstool_top=//tools/cpp:toolchain
-# Don't switch HOST compilers.
-build --host_crosstool_top=//tools/cpp:toolchain
+# Use platforms to build our code.
+build --incompatible_enable_cc_toolchain_resolution
+
+# For now we only support building on x86 Linux so we can hard-code the host
+# platform.
+build --host_platform=//tools/platforms:linux_x86
 
 # Always include debug information in the non-.stripped binaries.
 build --strip=never
@@ -18,6 +20,12 @@
 build --noincompatible_py3_is_default
 build --noincompatible_py2_outputs_are_suffixed
 
+# Shortcuts for selecting the target platform.
+build:k8 --platforms=//tools/platforms:linux_x86
+build:roborio --platforms=//tools/platforms:linux_roborio
+build:armhf-debian --platforms=//tools/platforms:linux_armhf
+build:cortex-m4f --platforms=//tools/platforms:cortex_m4f
+
 build:asan --copt -fsanitize=address
 build:asan --linkopt -fsanitize=address --linkopt -ldl
 build:asan --platform_suffix=-asan
@@ -71,7 +79,6 @@
 build --sandbox_fake_hostname=true
 build --sandbox_fake_username=true
 
-build --auto_cpu_environment_group=//tools:cpus
 startup --host_jvm_args=-Dbazel.DigestFunction=SHA1
 
 common --watchfs