claudetool/codereview: add caching in findRelatedFiles

Primary goal is latency reduction.
Also slightly reduces context usage.

Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: sa1007d82a5165ab4k
diff --git a/claudetool/codereview/testdata/related_files_cache_demo.txtar b/claudetool/codereview/testdata/related_files_cache_demo.txtar
new file mode 100644
index 0000000..997af17
--- /dev/null
+++ b/claudetool/codereview/testdata/related_files_cache_demo.txtar
@@ -0,0 +1,95 @@
+Tests that related files caching prevents duplicate processing and output
+
+-- a.go --
+package main
+
+func a() {}
+
+-- b.go --
+package main
+
+func b() {}
+
+-- c.go --
+package main
+
+func c() {}
+
+-- .commit --
+Add functions to a.go and b.go
+
+-- a.go --
+package main
+
+func a() {
+    // Update 1
+}
+
+-- b.go --
+package main
+
+func b() {
+    // Update 1
+}
+
+-- .commit --
+Add functions to a.go and b.go again
+
+-- a.go --
+package main
+
+func a() {
+    // Update 2
+}
+
+-- b.go --
+package main
+
+func b() {
+    // Update 2
+}
+
+-- .commit --
+Add functions to a.go and c.go
+
+-- a.go --
+package main
+
+func a() {
+    // Update 3
+}
+
+-- c.go --
+package main
+
+func c() {
+    // Update 1
+}
+
+-- .commit --
+Update file a.go only (first time)
+
+-- a.go --
+package main
+
+func a() {
+    // Update 4 - first analysis
+}
+
+-- .commit --
+First analysis of a.go change
+
+-- .run_test --
+OK
+-- a.go --
+package main
+
+func a() {
+    // Update 5 - second analysis (should be cached)
+}
+
+-- .commit --
+Second analysis of a.go change (should be cached)
+
+-- .run_test --
+OK