Add a memoize! macro and use it throughout rustc