In backends, do not store to private-> while loading, but only when everything is loaded

This is a workaround for a race condition and ultimately will need
another solution. The problem is that unload_image() runs in the main
thread and loading of images runs in a different one. If the user hits
space too fast, an image can be unloaded while it is still loading,
resulting in segfaults if e.g. a poppler page is requested when the
document has already been unloaded.

The correct solution is to also queue unloading of images and process
that in the 2nd too. abort_pending_image_loads() is what makes this
complicated.