compositor: add plugin-registry

Implement a simple register and lookup for function tables. This is
intended for plugins to expose APIs to other plugins.

It has been very hard to arrange a plugin to be able to call into
another plugin without modifying Weston core to explicitly support each
case. This patch fixes that.

The tests all pass.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 49ef063..33b86c1 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -783,6 +783,8 @@
 
 	struct weston_launcher *launcher;
 
+	struct wl_list plugin_api_list; /* struct weston_plugin_api::link */
+
 	uint32_t output_id_pool;
 
 	struct xkb_rule_names xkb_names;