compositor: Add debug key bindings infrastructure

Add the concept of debug key bindings, that are bindings that activate
debug features in the compositor. The bindings are added to a list in
the compositor, but the triggering them is left to the shell.

On the shell side, a global debug key binding is added. When the user
presses mod-shift-space, the shell will invoke the debug bindings based
on the next key press.

This also converts the debug shortcuts for repaint debugging, fan
repaint debugging and the hide overlays shortcut in compositor-drm to
use the new infrastructure.
diff --git a/src/compositor.h b/src/compositor.h
index d8d45e7..4963cda 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -320,6 +320,7 @@
 	struct wl_list key_binding_list;
 	struct wl_list button_binding_list;
 	struct wl_list axis_binding_list;
+	struct wl_list debug_binding_list;
 	struct {
 		struct weston_spring spring;
 		struct weston_animation animation;
@@ -631,6 +632,11 @@
 			           enum weston_keyboard_modifier modifier,
 			           weston_axis_binding_handler_t binding,
 				   void *data);
+struct weston_binding *
+weston_compositor_add_debug_binding(struct weston_compositor *compositor,
+				    uint32_t key,
+				    weston_key_binding_handler_t binding,
+				    void *data);
 void
 weston_binding_destroy(struct weston_binding *binding);
 
@@ -651,6 +657,11 @@
 weston_compositor_run_axis_binding(struct weston_compositor *compositor,
 				   struct weston_seat *seat, uint32_t time,
 				   uint32_t axis, int32_t value);
+int
+weston_compositor_run_debug_binding(struct weston_compositor *compositor,
+				    struct weston_seat *seat, uint32_t time,
+				    uint32_t key,
+				    enum wl_keyboard_key_state state);
 
 int
 weston_environment_get_fd(const char *env);