tests: use weston_compositor_exit

Use the proper function to exit instead of the libwayland one, to allow main
handle_exit() to be called.

This is just to unify the exit paths.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
diff --git a/tests/surface-global-test.c b/tests/surface-global-test.c
index 4604d19..59d4152 100644
--- a/tests/surface-global-test.c
+++ b/tests/surface-global-test.c
@@ -76,7 +76,7 @@
 	weston_view_from_global(view, 5, 10, &ix, &iy);
 	assert(ix == 0 && iy == 0);
 
-	wl_display_terminate(compositor->wl_display);
+	weston_compositor_exit(compositor);
 }
 
 WL_EXPORT int