Add events and get rid of ErrorInfoEncoder. Clean up some signatures and visibility in Skyframe classes.

PiperOrigin-RevId: 197665817
diff --git a/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java b/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java
index 82d58ea..7a2c416 100644
--- a/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java
+++ b/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java
@@ -56,7 +56,7 @@
         ImmutableList.of(cycleInfo),
         /*isDirectlyTransient=*/ false,
         /*isTransitivelyTransient=*/ false,
-        /* isCatostrophic= */ false);
+        /* isCatastrophic= */ false);
   }
 
   /** Create an ErrorInfo from a collection of existing errors. */
@@ -110,7 +110,7 @@
       ImmutableList<CycleInfo> cycles,
       boolean isDirectlyTransient,
       boolean isTransitivelyTransient,
-      boolean isCatostrophic) {
+      boolean isCatastrophic) {
     Preconditions.checkState(exception != null || !Iterables.isEmpty(cycles),
         "At least one of exception and cycles must be non-null/empty, respectively");
     Preconditions.checkState((exception == null) == (rootCauseOfException == null),
@@ -123,7 +123,7 @@
     this.cycles = cycles;
     this.isDirectlyTransient = isDirectlyTransient;
     this.isTransitivelyTransient = isTransitivelyTransient;
-    this.isCatastrophic = isCatostrophic;
+    this.isCatastrophic = isCatastrophic;
   }
 
   @Override
@@ -234,7 +234,7 @@
    * path is returned here. However, if there are multiple paths to the same cycle, each of which
    * goes through a different child, each of them is returned here.
    */
-  public Iterable<CycleInfo> getCycleInfo() {
+  public ImmutableList<CycleInfo> getCycleInfo() {
     return cycles;
   }