Workaround for OGL bug
Rename CTexture to CTextureRef to reflect it is only a reference
Remove textures with no references
Add cache for loaded bitmaps (reduces amount of duplicate textures)