Clients: Fix memleak issues in various clients of weston

In many clients of weston, Display was not being destroyed so added it.
Also destroy windows, widgets which were not being destroyed.

Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
diff --git a/clients/cliptest.c b/clients/cliptest.c
index 3cee343..a1928f4 100644
--- a/clients/cliptest.c
+++ b/clients/cliptest.c
@@ -879,6 +879,14 @@
 	return 0;
 }
 
+static void
+cliptest_destroy(struct cliptest *cliptest)
+{
+	widget_destroy(cliptest->widget);
+	window_destroy(cliptest->window);
+	free(cliptest);
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -897,9 +905,8 @@
 	cliptest = cliptest_create(d);
 	display_run(d);
 
-	widget_destroy(cliptest->widget);
-	window_destroy(cliptest->window);
-	free(cliptest);
+	cliptest_destroy(cliptest);
+	display_destroy(d);
 
 	return 0;
 }