Store in a cache the sprites obtained from the spritepos files.

This helps to reduce the construction time of the items, and thus
the loading time.
Reduce the scope of the lock when setting the pixels of a texture.
Use a thread to copy the images' data into the textures.

This helps to avoid waiting for the texture lock to be released
before continuing the loading of the levels.
Code cleaning.