clib/gir: Also finalize returned structs for which we take ownership
only add a weakref if it's no null pointer instead of checking in the destructor