Use proto_toolchain in proto_library

Change --incompatible_enable_proto_toolchain_resolution flag to a loading time flag. This is partial revert of https://github.com/bazelbuild/bazel/commit/11cf1b756b77c6159fbb5c9ab480b742ea85b5b6. We need a load time flag, because toolchain type might not exist at current versions of rules repos users use.

When the flag is set, proto_library defines the toolchain and doesn't use an implicit dependency at the same time.

In Bazel the flag may only be flipped after all the rules_* repo are upgraded to define toolchain type and protobuf repository registers the toolchains.

Issue: https://github.com/bazelbuild/rules_proto/issues/179
PiperOrigin-RevId: 567296665
Change-Id: Ib3fc27751dd14589fa403f45d2cbbad22537b9a3
diff --git a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
index 69b11d5..fb71902 100644
--- a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
+++ b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
@@ -26,6 +26,9 @@
 
   public static final String LOAD_PROTO_LIBRARY =
       "load('@rules_proto//proto:defs.bzl', 'proto_library')";
+  public static final String PROTO_TOOLCHAIN =  "@rules_proto//proto:toolchain_type";
+  public static final String LOAD_PROTO_TOOLCHAIN =
+      "load('@rules_proto//proto:proto_toolchain.bzl', 'proto_toolchain')";
   public static final String LOAD_PROTO_LANG_TOOLCHAIN =
       "load('@rules_proto//proto:defs.bzl', 'proto_lang_toolchain')";