compositor: Fix crash when surface is map'd and unmap'd before repaint
compositor: Fix crash when surface is map'd and unmap'd before repaint

If a surface is map'd and unmap'd before an output repaint occurs, it
is not added to the compositor's surface list, so the field
weston_surface::link might be invalid (the field is initialized on
weston_surface_create()), and it that case Weston will crash on the
call to wl_list_remove(&surface->link) in weston_surface_unmap().

Initialize the surface->link after the call to wl_list_remove() to make
sure a following call to wl_list_remove() won't cause a crash.

jonnylamb/weston,jonnylamb/weston,Gnurou/weston,Fantu/compositor-spice,mchalupa/weston,giucam/weston,Gnurou/weston,sir-murray/weston,udoprog/weston,udoprog/weston,Tarnyko/weston-xdg_surface_present,xorgy/weston,sir-murray/weston,krezovic/weston,Fantu/compositor-spice,kwm81/weston,xorgy/weston,giucam/weston,eyolfson/weston,krezovic/weston,mchalupa/weston,Tarnyko/weston-xdg_surface_present,kwm81/weston,Fantu/compositor-spice,eyolfson/weston