Share a single QSGTexture instance for each ImageResource

The textures are lazily created in the rendering thread, and deleted
using deleteLater. This should make sure they are not deleted while
the rendering thread may still be using them.