fix some problems related to weston_log_context
weston_log_ctx_compositor_setup() is folded into
weston_compositor_create(), since it's tiny and being called only once.
weston_log_ctx_compositor_create() is renamed to
weston_log_ctx_create() because it does not take
struct weston_compositor as argument.
struct weston_log_context that are unlinked from
struct weston_compositor to be destroyed.
With this change, one could destroy a
struct weston_compositor and keep the related
struct weston_log_context. But if
struct weston_compositor gets destroyed it's also necessary to destroy
weston_log_context::global, as the debug protocol depends on the compositor. So a listener has been added to the destroy signal of the compositor.
This could be done moving
struct weston_compositor, but since the debug protocol is strongly related with the log context (as mentioned by @marius.vlad0 in #338 (comment 390462)), it may be better to do it like this (using a listener, as mentioned before).
4/4: After commit 3/4, it's not necessary to keep a zombie
struct weston_compositor just to be able to destroy
log_ctx. This allow us to fold
Fixes: #338 (closed)