Bump Bazel to 4.0.0

This bumps Bazel to 4.0.0 because we want to use ProtoModule. The update was relatively painless,
no incompat-flags needed to be switched back off. `bazel_gazelle` is pinned on a master version
since they haven't released a Bazel 4-comaptible version yet and I have one patch against Kubernetes's
infra repo which is going upstream.

Test Plan: Build system change, should be covered by existing tests

X-Origin-Diff: phab/D701
GitOrigin-RevId: 24f675e6ba33efb9f46191eccca95088d7d2d1f1
diff --git a/build/fietsje/deps_kubernetes.go b/build/fietsje/deps_kubernetes.go
index baa7d15..77343cd 100644
--- a/build/fietsje/deps_kubernetes.go
+++ b/build/fietsje/deps_kubernetes.go
@@ -38,6 +38,7 @@
 	).inject(
 		// repo infra, not requested by k8s, but used with bazel
 		"k8s.io/repo-infra", "a3483874bd37251c629c92df6d82a226b0e6ad92",
+		prePatches("k8s-infra-bzl4-compat.patch"),
 	).with(prePatches("k8s-client-go.patch")).use(
 		"k8s.io/client-go",
 	).with(patches("k8s-native-mounter.patch")).use(
diff --git a/build/fietsje/planner.go b/build/fietsje/planner.go
index a609884..d006039 100644
--- a/build/fietsje/planner.go
+++ b/build/fietsje/planner.go
@@ -142,11 +142,14 @@
 // inject adds a dependency to a collection as if requested by the high-level dependency of the collection. This should
 // be used sparingly, for instance when high-level dependencies contain bazel code that uses some external workspaces
 // from Go modules, and those workspaces are not defined in parsed transitive dependency definitions like go.mod/sum.
-func (c *collection) inject(importpath, version string) *collection {
+func (c *collection) inject(importpath, version string, opts ...buildOpt) *collection {
 	d := c.highlevel.child(importpath, version)
 	c.transitive[importpath] = d
 	c.p.available[importpath] = d
 	c.p.enabled[importpath] = true
+	for _, o := range opts {
+		o(c.transitive[importpath])
+	}
 
 	return c
 }