Do not run cleanup while printing is ongoing.

During investigation of #4994 it became clear that one possible problem with fonts in print is that while printing is ongoing a font is removed and reloaded. If cleanup was set to a low number the problem disappeared.

the cleanup was scheduled when no page or thumbnail was rendered. Because printing uses a different mechanism, t could happen that printing occurs at the same time as cleanup. This is consistent with the observation that the error was reproducible after a few tries (most likely just hitting the 30 second mark).

The solution is to not run cleanup while printing is ongoing. Therefor a flag is set and renderHighestPriority() invoked before and after printing.
well widening the lock should not be a problem. if we have any doubt we should do it. ill update the pr