Start the imageloader only when all window events have been handled
This fixes the issue where the reference image docker would crash Krita on startup if it is undocked.
BUG:385226