compositor: Hide surfaces by setting surface->output to NULL

This way we can still use surface->link when a surface is not in
the main compositor surface list and don't need the hidden_surface
wrapper object.  Also, setting surface->output to NULL will block
the surface frame callback until we put the surface back into the
main list.  This has the effect of blocking animations while a surface
isn't visible.
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 2ba4fcd..adf3a5c 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -398,8 +398,9 @@
 }
 
 static struct unlock_dialog *
-unlock_dialog_create(struct display *display)
+unlock_dialog_create(struct desktop *desktop)
 {
+	struct display *display = desktop->display;
 	struct unlock_dialog *dialog;
 
 	dialog = malloc(sizeof *dialog);
@@ -419,6 +420,9 @@
 				      unlock_dialog_item_focus_handler);
 	dialog->button = window_add_item(dialog->window, NULL);
 
+	desktop_shell_set_lock_surface(desktop->shell,
+				       window_get_wl_surface(dialog->window));
+
 	unlock_dialog_draw(dialog);
 
 	return dialog;
@@ -467,13 +471,9 @@
 	struct desktop *desktop = data;
 
 	if (!desktop->unlock_dialog) {
-		desktop->unlock_dialog =
-				unlock_dialog_create(desktop->display);
+		desktop->unlock_dialog = unlock_dialog_create(desktop);
 		desktop->unlock_dialog->desktop = desktop;
 	}
-
-	desktop_shell_set_lock_surface(desktop_shell,
-			window_get_wl_surface(desktop->unlock_dialog->window));
 }
 
 static const struct desktop_shell_listener listener = {