Make print() work from starlark transition implementation functions.

Give each starlark transition a stored event handler. After starlark transitions are applied (after top level transitions and inside configuration resolver), replay and then clear events.

Declare a new abstract class for starlark transitions to consolidate fields/behavior.

Add behavior to ComposingTransitions to allow decomposition. This is helpful here but will also be helpful in future work where we'll need to post-process starlark transitions after they've been applied (e.g. output type verification).

#5574

RELNOTES: None.
PiperOrigin-RevId: 229417148
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Attribute.java b/src/main/java/com/google/devtools/build/lib/packages/Attribute.java
index 4d0d865..ae6451d 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Attribute.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Attribute.java
@@ -2150,6 +2150,11 @@
     return splitTransitionProvider.apply(attributeMapper);
   }
 
+  @VisibleForTesting
+  public SplitTransitionProvider getSplitTransitionProviderForTesting() {
+    return splitTransitionProvider;
+  }
+
   /**
    * Returns true if this attribute transitions on a split transition.
    * See {@link SplitTransition}.