wayland: Add serial logic for grabbing mechanism

This will be used for wl_shell_surface_move, wl_shell_surface_resize and
wl_shell_surface_set_popup, that are coming next.