compositor: keep track of the weston_layer a weston_view is in

This introduces a new struct, weston_layer_entry, which is now used
in place of wl_list to keep the link for the layer list in weston_view
and the head of the list in weston_layer.
weston_layer_entry also has a weston_layer*, which points to the layer
the view is in or, in the case the entry it's the head of the list, to
the layer itself.
diff --git a/src/data-device.c b/src/data-device.c
index a069b3c..75fc60c 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -180,7 +180,7 @@
 		       struct weston_surface *es,
 		       int32_t sx, int32_t sy)
 {
-	struct wl_list *list;
+	struct weston_layer_entry *list;
 	float fx, fy;
 
 	assert((pointer != NULL && touch == NULL) ||
@@ -193,8 +193,8 @@
 		else
 			list = &es->compositor->cursor_layer.view_list;
 
-		wl_list_remove(&drag->icon->layer_link);
-		wl_list_insert(list, &drag->icon->layer_link);
+		weston_layer_entry_remove(&drag->icon->layer_link);
+		weston_layer_entry_insert(list, &drag->icon->layer_link);
 		weston_view_update_transform(drag->icon);
 		pixman_region32_clear(&es->pending.input);
 	}