compositor: send the output_created signal after inserting it in the list

The compositor's output_created signal used to be sent in weston_output_init()
which the backend call before putting the output in the output_list.
This caused problems when creating a new view in a listener to that signal,
because weston_view_assign_output() doesn't yet know the new output exists.
To fix this add a new weston_composito_add_output() func which adds the
output in the list and later sends the signal, and make the backends call
that.
diff --git a/src/compositor.c b/src/compositor.c
index 698ee52..8f02b4d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4125,7 +4125,20 @@
 	output->global =
 		wl_global_create(c->wl_display, &wl_output_interface, 2,
 				 output, bind_output);
-	wl_signal_emit(&c->output_created_signal, output);
+}
+
+/** Adds an output to the compositor's output list and
+ *  send the compositor's output_created signal.
+ *
+ * \param compositor The compositor instance.
+ * \param output The output to be added.
+ */
+WL_EXPORT void
+weston_compositor_add_output(struct weston_compositor *compositor,
+                             struct weston_output *output)
+{
+	wl_list_insert(compositor->output_list.prev, &output->link);
+	wl_signal_emit(&compositor->output_created_signal, output);
 }
 
 WL_EXPORT void