bazel: add --max_computation_steps flag

This change adds a --max_computation_steps=<n> flag that imposes a limit on the
number of abstract computation steps to execute a single BUILD file.
Its default value is zero, meaning no limit.
The count is deterministic, and is retained in the package metadata.

Abstract computation steps are currently eval, exec, and assign operations in
the tree-walking interpreter, but in future they will mean byte code instructions;
the two measures are incommensurable.

There is no corresponding flag for .bzl files, but they typically
do little more than execute def statements.

In the Usual Benchmark, the minimum limit for success is 4.2e6 steps,
but individual whoppers are readily found in Google's code base that
exceed 5e8 steps.

RELNOTES: The --max_computation_steps flag bounds the computation done by a BUILD file.
PiperOrigin-RevId: 301658760
diff --git a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
index c1a5470..099e33f 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
@@ -166,6 +166,7 @@
         "--incompatible_restrict_string_escapes=" + rand.nextBoolean(),
         "--incompatible_use_cc_configure_from_rules_cc=" + rand.nextBoolean(),
         "--internal_skylark_flag_test_canary=" + rand.nextBoolean(),
+        "--max_computation_steps=" + rand.nextLong(),
         "--record_rule_instantiation_callstack=" + rand.nextBoolean());
   }
 
@@ -221,6 +222,7 @@
         .incompatibleRestrictStringEscapes(rand.nextBoolean())
         .incompatibleUseCcConfigureFromRulesCc(rand.nextBoolean())
         .internalSkylarkFlagTestCanary(rand.nextBoolean())
+        .maxComputationSteps(rand.nextLong())
         .recordRuleInstantiationCallstack(rand.nextBoolean())
         .build();
   }