cogl-material: Unref the texture when reverting authority
cogl-material: Unref the texture when reverting authority

When the texture is set on a layer so that it is back to the parent's
texture it would clear the texture change flag but it wouldn't unref
the texture. The free function for a material layer does not unref the
texture if the change flag is cleared so the texture would end up
leaking. This happens for ClutterTexture because it disposes the
texture by setting layer 0 of the material to COGL_INVALID_HANDLE
which ends up the same as the default material.

gcampax/cogl,djdeath/cogl-android,Distrotech/cogl,Distrotech/cogl,djdeath/cogl-android,gcampax/cogl,djdeath/cogl,spatulasnout/cogl,Distrotech/cogl,djdeath/cogl,djdeath/cogl-android,gcampax/cogl,djdeath/cogl,gcampax/cogl,collects/cogl,Distrotech/cogl,spatulasnout/cogl,collects/cogl