Image loader: Load new images before unloading old ones

This has some impact on file buffers: If the old images are unloaded
before the new image is loaded, a refcounter might decrease to zero and
therefore invalidate the buffer, initiating unnecessary I/O for
multi-page images.