Ensure that periodical cleaning of expired retained messages consume reasonable amount of resources, especially in situations with a huge number of expired messages.