When disposing a material layer of type 'texture' we should check that the texture handle is still valid before calling cogl_handle_unref(). This avoids an assertion failure when disposing a ClutterTexture.