compiler: add `show` methods for `InferenceState` and `CachedMethodTable` (#51170)
Both `InferenceState` and `CachedMethodTable` contain caches to store
inference results, making their default `show` methods excessively
verbose. This commit introduces specialized `show` methods designed to
display only the most essential information.