Migrate sanitizers to transition mutators.

The logic is not 100% provably the same since HEAD was quite
confusing at some points, but I did make an effort to preserve
functional equivalence.

In case that effort was not enough, it should be pretty easy to
tweak the logic at HEAD since it's still quite malleable.

Bug: 231370928
Test: Presubmits.
Change-Id: I17b2efbfb5c4d0aedd922caed54ff8d857e578df
diff --git a/cc/cc.go b/cc/cc.go
index 55c0e48..57cb6b6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -982,6 +982,7 @@
 			return library.shared()
 		}
 	}
+
 	panic(fmt.Errorf("Shared() called on non-library module: %q", c.BaseModuleName()))
 }