Replace go_name_hack with a usage of Label (#3035)

The Label constructor can be used to transform a label string such as
@io_bazel_rules_go//foo:bar into the canonical label referencing this
target from the repository in which it is called.

For example, `str(Label("@io_bazel_rules_go//foo:bar"))` returns
`"@io_bazel_rules_go//foo:bar"` if rules_go is used as an external
repository from another main workspace, but returns `"//foo:bar"` when
rules_go is the main repository (e.g., when running the tests in the
CI).

This requires raising the minimum version of Bazel from 4.2.0 to 4.2.1
due to https://github.com/bazelbuild/bazel/issues/13890.
6 files changed