compositor: Use a minimal restore handler for crash clean up

When we hit a segv, it's often the case that we might crash again in
the attempt to clean up.  Instead we introduce a minimal restore callback
in the backend abstraction, that shuts down as simply as possible.  Then
we can call that from the segv handler, and then to aid debugging, we
raise SIGTRAP in the segv handler.  This lets us run gdb on weston from
a different vt, and if we tell gdb

  (gdb) handle SIGSEGV nostop

gdb won't stop when the segv happens but let weston clean up and switch vt,
and then stop when SIGTRAP is raised.

It's also possible to just let gdb catch the segv, and then use sysrq+k
followed by manual vt switch to get back.
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index f2f0cb1..e27555d 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1029,6 +1029,11 @@
 }
 
 static void
+x11_restore(struct weston_compositor *ec)
+{
+}
+
+static void
 x11_destroy(struct weston_compositor *ec)
 {
 	struct x11_compositor *compositor = (struct x11_compositor *)ec;
@@ -1087,6 +1092,7 @@
 		goto err_xdisplay;
 
 	c->base.destroy = x11_destroy;
+	c->base.restore = x11_restore;
 
 	if (weston_compositor_init_gl(&c->base) < 0)
 		goto err_egl;