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.
is this a safe change, will it ever be null?