libweston: fold weston_compositor_tear_down() into weston_compositor_destroy()

The only reason why we have both weston_compositor_tear_down() and
weston_compositor_destroy() is that the only we had to destroy
the log context was keeping weston_compositor alive and calling
weston_log_ctx_compositor_destroy().

After commit "weston-log: replace weston_log_ctx_compositor_destroy()
by weston_log_ctx_destroy()", it's not necessary to keep a zombie
weston_compositor just to be able to call
weston_log_ctx_compositor_destroy().

Fold weston_compositor_tear_down() into weston_compositor_destroy(),
as this split is useless now.

Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 2f8af3c..f7e2afd 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -6529,7 +6529,7 @@
  * The heads attached to the given output are detached and become unused again.
  *
  * It is not necessary to explicitly destroy all outputs at compositor exit.
- * weston_compositor_tear_down() will automatically destroy any remaining
+ * weston_compositor_destroy() will automatically destroy any remaining
  * outputs.
  *
  * \ingroup ouput
@@ -7633,7 +7633,7 @@
  * the plugin destruction order is not guaranteed: plugins that depend on other
  * plugins must be able to be torn down in arbitrary order.
  *
- * \sa weston_compositor_tear_down, weston_compositor_destroy
+ * \sa weston_compositor_destroy
  */
 WL_EXPORT bool
 weston_compositor_add_destroy_listener_once(struct weston_compositor *compositor,
@@ -7648,19 +7648,16 @@
 	return true;
 }
 
-/** Tear down the compositor.
+/** Destroys the compositor.
  *
- * This function cleans up the compositor state. While the compositor state has
- * been cleaned do note that **only** weston_compositor_destroy() can be called
- * afterwards, in order to destroy the compositor instance.
+ * This function cleans up the compositor state and then destroys it.
  *
- * @param compositor The compositor to be tear-down/cleaned.
+ * @param compositor The compositor to be destroyed.
  *
  * @ingroup compositor
- * @sa weston_compositor_destroy
  */
 WL_EXPORT void
-weston_compositor_tear_down(struct weston_compositor *compositor)
+weston_compositor_destroy(struct weston_compositor *compositor)
 {
 	/* prevent further rendering while shutting down */
 	compositor->state = WESTON_COMPOSITOR_OFFSCREEN;
@@ -7685,20 +7682,7 @@
 
 	weston_log_scope_destroy(compositor->timeline);
 	compositor->timeline = NULL;
-}
 
-/** Destroys the compositor.
- *
- * This function destroys the compositor. **Do not** call this before
- * calling weston_compositor_tear_down()
- *
- * @param compositor The compositor to be destroyed.
- * @ingroup compositor
- * @sa weston_compositor_tear_down()
- */
-WL_EXPORT void
-weston_compositor_destroy(struct weston_compositor *compositor)
-{
 	free(compositor);
 }