cogl-atlas-texture: Make copying a texture out more robust
cogl-atlas-texture: Make copying a texture out more robust

Previously when _cogl_atlas_texture_migrate_out_of_atlas is called it
would unreference the atlas texture's sub-texture before calling
_cogl_atlas_copy_rectangle. This would leave the atlas texture in an
inconsistent state during the copy. This doesn't normally matter but
if the copy ends up doing a render then the atlas texture may end up
being referenced. In particular it would cause problems if the texture
is left in a texture unit because then Cogl may try to call
get_gl_texture even though the texture isn't actually being used for
rendering. To fix this the sub texture is now unrefed after the copy
call instead.

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