actually return reference counted, non-floating variant. Ensure that we
always keep pointers to these so that we can properly unref them.
The same also applies to g_variant_iter_next_value.
Also fix a couple of other minor leaks along the way. This fixes
LP: #722972