Refactor StandaloneTestStrategy with new interfaces

This change adds a set of generic interfaces to TestStrategy, in terms
of which all existing strategies can be implemented. It also refactors
StandaloneTestStrategy to do so.

This increases sharing at the test strategy level, which is in
preparation for supporting async test execution.

Note that this fixes the collection of SpawnResult instances as a side
effect - previously we only kept the last SpawnResult, now we collect
all of them.

PiperOrigin-RevId: 235914420
diff --git a/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java b/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java
index b499f26..5ea50c6 100644
--- a/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java
@@ -255,7 +255,7 @@
     List<SpawnResult> spawnResults =
         standaloneTestStrategy.exec(testRunnerAction, actionExecutionContext);
 
-    assertThat(spawnResults).containsExactly(passSpawnResult);
+    assertThat(spawnResults).containsExactly(failSpawnResult, passSpawnResult).inOrder();
 
     TestResult result = standaloneTestStrategy.postedResult;
     assertThat(result).isNotNull();