nested: Add the buffer reference semantics from Weston
nested: Add the buffer reference semantics from Weston

This copies the buffer reference busy count implementation from Weston
to the nested compositor example and adds an internal nested_buffer
struct that we could eventually use to attach data. This will be
useful to adapt the example to use subsurfaces so that we can attach
our compositor-side buffer to the resource.

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