Speedup known os/arch checks (#2100)

**What type of PR is this?**
Performance

**What package or component does this PR mostly affect?**
language/go, although we could potentially reuse this for the `rule`
package as well. I left it as-is since it has comments around these
platforms being deprecated and needing to live in //language/go

**What does this PR do? Why is it needed?**
The switch-case lets the compiler optimize more than the map lookup.
This is a further 30-40% win on the benchmark added in
https://github.com/bazel-contrib/bazel-gazelle/pull/2099. I also fixed
the other callers in //language/go because it's also simpler

**Which issues(s) does this PR fix?**

Fixes #

**Other notes for review**
7 files changed