object: add gst_clear_object().
This is based on g_clear_object()
. Basically, you can use this instead
of using g_object_unref
(which needs to be preceded by a NULL-check).
Patch from issue #275 (closed) converted into an MR.
Edited by Sebastian Dröge