[TASK] Log skipped persistAll() due to closed EntityManager
To avoid exceptions we only flush the EM if it is still open. To be
able to spot errors more easily, this adds a log entry if the EM
was closed and flushing was skipped.
Releases: 1.1, 1.2