GVariant: add preconditions to ref. counting functions