Create named classes for cache objects

This makes heampdump and coredump analysis dramatically easier as cached entries will appear in the respective tools as `MemoryCacheSegement` and `MemoryCacheEntry` rather than generic objects. This allows for much simpler analysis of the memory impact of the cache as a whole.
With this change we are always setting `byteSize`, regardless of the setting state. This is minimal overhead and it seemed like it could be useful for debugging.