Make sure only one texture is created per image

If more that one atlas/image sprite exists, a new texture was created every time the image sprite had to be switched.

This change makes sure that there is only one texture per image. This is an improvement, but you still feel the texture switches (compared to a single texture without texture switches).
Good point with the type!