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-wayland.c b/src/compositor-wayland.c
index ee3def1..8e86611 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -824,6 +824,11 @@
 }
 
 static void
+wayland_restore(struct weston_compositor *ec)
+{
+}
+
+static void
 wayland_destroy(struct weston_compositor *ec)
 {
 	weston_compositor_shutdown(ec);
@@ -871,6 +876,7 @@
 		goto err_display;
 
 	c->base.destroy = wayland_destroy;
+	c->base.restore = wayland_restore;
 
 	if (weston_compositor_init_gl(&c->base) < 0)
 		goto err_display;