Abstraction Reorganization

Split apart the "memoization" abstraction into a separate "invariant"
abstraction as well as a separate compile class. Result is more powerful
and flexible caching. Caching also now occurs on a per-module basis.