ISPN-3144 Reduce per-entry memory consumption

* Internal cache entries no longer have a internal cache value
reference, instead they store data directly.
* Made mime metadata for REST more space efficient.