Make SurfaceBuffer::destroyTexture be reenterable

When QOpenGLSharedResourceGuard is freed, destroyTexture
might be reentered to cause double free. If a texture has
reference to wl_buffer which is already destroyed, freeing
the texture with decreasing reference counter will call
wl_resource_destroy for wl_buffer. Then destroyTexture will
be reentered through destroy_listener_callback.

Change-Id: I156f410ce1a05b3041b05a310b5d3d79d38e0a8c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>