Fix EZP-22836: Cache not being cleared with object state creating

This PR resolves issue https://jira.ez.no/browse/EZP-22836

This implements slots for clearing Legacy Stack ObjectState cache.
`ezpublish-legacy` repo part of the issue is covered by https://jira.ez.no/browse/EZP-22749 and https://github.com/ezsystems/ezpublish-legacy/pull/955.