display: make get_drawable symmetric to display_channel_drawable_unref
display: make get_drawable symmetric to display_channel_drawable_unref

Make possible to safely call display_channel_drawable_unref straight
after calling get_drawable.

Problem was function definitions and dependency.

display_channel_drawable_try_new is supposed to return an uninitialized
pointer (or NULL on failure) to a Drawable structure.

(display_channel_)get_drawable is supposed to return an initialized
pointer (or NULL) to a Drawable structure.

(display_channel_)add_drawable is supposed to add the Drawable to the
list/tree of drawing to draw.

Now, with these definitions after get_drawable the Drawable state (if
pointer is not NULL) should be consistent and we should be able to call
display_channel_drawable_unref.

In the current code this was not true as for instance surface_id was
copied to Drawable but the reference counter of the surface was not
incremented leading possible unref call to decrement the counter and
free the surface. This can happen if any call between get_drawable and
unref does not increment the reference in a consistent way. This
basically means that every present or future code in the path between
get_drawable and unref have to know this unconsistency and handle it.
This is a maintaining problem as people need to know these details when
editing existing code (actually this is display_channel_add_drawable
code).
This basically create a dependency between get_drawable and
add_drawable.

Signed-off-by: Frediano Ziglio <55d48b080b2e443e395cde84d2c83b135a4ff48e@redhat.com>
Acked-by: Jonathon Jongsma <c7254805a17bd5c41e24c3a278fcbf3afcdfb0fa@redhat.com>

SPICE/spice,fgouget/spice,fgouget/spice,SPICE/spice,fgouget/spice,fgouget/spice,SPICE/spice