Add hook to process SkyframeExecutor in tests. Also add sentinel exception to indicate unserializability, improve error message in Path when serialization fails, and add some test-only methods to SkyframeExecutor and PackageFactory.

PiperOrigin-RevId: 162993806
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/Path.java b/src/main/java/com/google/devtools/build/lib/vfs/Path.java
index b41589c..a1436b5 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/Path.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/Path.java
@@ -216,7 +216,8 @@
   }
 
   private void writeObject(ObjectOutputStream out) throws IOException {
-    Preconditions.checkState(fileSystem == fileSystemForSerialization, fileSystem);
+    Preconditions.checkState(
+        fileSystem == fileSystemForSerialization, "%s %s", fileSystem, fileSystemForSerialization);
     out.writeUTF(getPathString());
   }