texture: Add more validation on the material
texture: Add more validation on the material

If set_cogl_texture() is called after unsetting the Texture's material
then we really want to make a copy of the template.

Also, we should assert more often if the internal state goes horribly
wrong: at least, we'll have a backtrace.

djdeath/clutter-multithreaded,ebassi/clutter,jigpu/clutter,djdeath/clutter-android,Distrotech/clutter,djdeath/clutter-android,GNOME/clutter,spatulasnout/clutter,heysion/clutter-clone,dlespiau/clutter,jigpu/clutter,djdeath/clutter,djdeath/clutter,jigpu/clutter,heysion/clutter-clone,collects/clutter,djdeath/clutter,GNOME/clutter,djdeath/clutter-android,jigpu/clutter,djdeath/clutter-android,ebassi/clutter,jigpu/clutter,nobled/clutter,djdeath/clutter,collects/clutter,Distrotech/clutter,kerrickstaley/clutter-vala,kerrickstaley/clutter-vala,spatulasnout/clutter,djdeath/clutter-android,spatulasnout/clutter,spatulasnout/clutter,djdeath/clutter,djdeath/clutter-multithreaded,heysion/clutter-clone,djdeath/clutter,Distrotech/clutter,GNOME/clutter,heysion/clutter-clone,kerrickstaley/clutter-vala,djdeath/clutter-multithreaded,ebassi/clutter,heysion/clutter-clone,GNOME/clutter,nobled/clutter,dlespiau/clutter,collects/clutter,ebassi/clutter,Distrotech/clutter,jigpu/clutter,nobled/clutter,Distrotech/clutter,djdeath/clutter-multithreaded,collects/clutter,kerrickstaley/clutter-vala,dlespiau/clutter,collects/clutter,ebassi/clutter,spatulasnout/clutter,Distrotech/clutter,GNOME/clutter