compositor: refactor surface_attach()
compositor: refactor surface_attach()

surface_attach() does two things: sets up a new buffer as the contents
of the given surface and then calls into shell so it can setup the
position of the surface and map it if necessary. However we do not want
the shell to meddle with some internal surfaces such as drag surfaces.

The intention of this refactoring is to make room for making the part
that calls into shell a virtual function that the compositor can
override for these internal surfaces.

This changes weston_buffer_attach() so it handle all the logic of tying
a buffer to a surface, including unmapping it when the buffer is NULL.
The shell map() vs. configure() logic is then split into a another
function: surface_configure(). In a later commit, this function will be
turned into a function pointer in struct weston_surface.

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