MER: [compositor] Avoid potential crash in compositor.

If we called disown on a buffer after it got destroyed we would
touch the m_buffer handle which was then invalid which would
crash.

For upstream this functionality is implemented in
https://codereview.qt-project.org/#change,81757
MER: Listen for the destruction of the focus surfaces' resources

With the new delete guard a QWaylandSurface survives for some time after
the destruction of its wl_resource, so have the wl_keyboard, wl_pointer and
wl_touch objects watch for the destruction of their focus surfaces to avoid
using them after the destruction

Conflicts:
	src/compositor/wayland_wrapper/qwlkeyboard.cpp
	src/compositor/wayland_wrapper/qwlkeyboard_p.h
	src/compositor/wayland_wrapper/qwlpointer_p.h
	src/compositor/wayland_wrapper/qwltextinputmanager_p.h
	src/compositor/wayland_wrapper/qwltouch.cpp

For upstream this functionality is implemented in
https://codereview.qt-project.org/#change,81757
MER: Check if the surface is valid before setting it as focus

A surface may get its resource destroyed and during the time it takes to
be destroyed it must not be set as mouse of keyboard focus.

Conflicts:
	src/compositor/wayland_wrapper/qwlsurface.cpp
	src/compositor/wayland_wrapper/qwlsurface_p.h

For upstream this functionality is implemented in
https://codereview.qt-project.org/#change,81757
Fix possible racey crash after surface destruction