unloadUnreferencedMaterials: Properly unload materials instead of removing techniques

Removing all techniques means the material will have to be rebuilt the next time it is used.
By simply unloading materials instead, the material structure stays intact, and Texture ptrs get released (which is all we are interested in)