Remove generics use from critical path classes

- remove generic types from AggregatedCriticalPath
- remove generic types from CriticalPathComputer
- remove generic types from AbstractCriticalPathComponent
- rename AbstractCriticalPathComponent to CriticalPathComponent
- add SpawnMetrics, id to CriticalPathComponent
- add SpanwMetrics to AggregatedCriticalPath
- remove SimpleCriticalPathComponent

PiperOrigin-RevId: 213605615
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BuildSummaryStatsModule.java b/src/main/java/com/google/devtools/build/lib/runtime/BuildSummaryStatsModule.java
index 85c1a47..86d4e80 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BuildSummaryStatsModule.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BuildSummaryStatsModule.java
@@ -103,7 +103,7 @@
       if (criticalPathComputer != null) {
         try (SilentCloseable c =
             Profiler.instance().profile(ProfilerTask.CRITICAL_PATH, "Critical path")) {
-          AggregatedCriticalPath<SimpleCriticalPathComponent> criticalPath =
+          AggregatedCriticalPath criticalPath =
               criticalPathComputer.aggregate();
           items.add(criticalPath.toStringSummary());
           statistics.add(
@@ -115,7 +115,7 @@
           // We reverse the critical path because the profiler expect events ordered by the time
           // when the actions were executed while critical path computation is stored in the reverse
           // way.
-          for (SimpleCriticalPathComponent stat : criticalPath.components().reverse()) {
+          for (CriticalPathComponent stat : criticalPath.components().reverse()) {
             Profiler.instance()
                 .logSimpleTaskDuration(
                     stat.getStartTimeNanos(),