Added texture caching for file-loaded textures

Also improved parts of animated graphics object loading.