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.
The reason that I asked is that I'm not sure exactly how the event loop in JavaScript handles this case. I'm wondering if it's possible that a previously set `idleTimeout` could be allowed to run before the entire loop has completed (thus causing issues)?
@yurydelendik Is this something that we should be concerned about here?