Persist cached pubsub data prior to shutdown

Description

CachingPubsubPersistenceProvider periodically flushes state changes to the database, to ensure that those changes are persisted.

When Openfire is shut down, and changes are cached, those should be persisted prior to shutdown, to prevent them from being lost completely.

Environment

None
Fixed

Assignee

Guus der Kinderen

Reporter

Guus der Kinderen