Fix handling of GValues containing a floating GObject
Fix handling of GValues containing a floating GObject

We can't simply use g_value_dup_object() and take ownership of the new
reference as on the next opportunity it will be passed to
g_object_ref_sink() in a transfer-none context and that will
accidentally take ownership of the same reference and we get a double
unref() at a later time.

Instead use g_value_get_object(), if the object was floating call
g_object_ref_sink() to sink it and have the GValue as the one and only
owner at this point and then get a new reference for ourselves.

See https://gitlab.gnome.org/GNOME/pygobject/merge_requests/120

rust-gnome/glib