Propagate external network allowlist for tests to Starlark rules.

Rule declarations pick up the [allowlist](https://github.com/bazelbuild/bazel/blob/897aa816186327f7a5af19cc4983b9778ff3e8b7/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java#L260-L264) which [comes from the `StarlarkThread`](https://github.com/bazelbuild/bazel/blob/897aa816186327f7a5af19cc4983b9778ff3e8b7/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java#L304-L311). Add the allowlist to `BazelStarlarkContext` used when declaring Starlark rules so that it adds an attribute with the allowlist in them.

Remove `$` and `allowlist` from the allowlist attribute base name since `Allowlist.getAttributeFromAllowlistName` already adds those.

PiperOrigin-RevId: 391837774
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index b6b9d63..0b9bbe7 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -1202,7 +1202,8 @@
             getTarget().getPackage().getRepositoryMapping(),
             /*convertedLabelsInPackage=*/ new HashMap<>(),
             getSymbolGenerator(),
-            getLabel())
+            getLabel(),
+            /*networkAllowlistForTests=*/ null)
         .storeInThread(thread);
     return thread;
   }