libvirt-virsh: Use weakref from VirshClosure to VirshPersistent.

To avoid circle reference, we use a class variable named closure_args
to replace VirshPersistent object for VirshClosure.dict-like-instance.
But we need to override the all item setting method in Virsh, such as
__setitem__, dict_set, super_set. It is not a good design.

Then, we use weakref to make reference from VirshClosure to VirshPersistent
weak, so that the __del__ method in VirshPersistent will work properly.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt-virsh: update virsh_unittest for weakref using in virsh.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt-virsh: fix __call__ in VirshClosure to avoid update dargs in VirshPersistent.

Previously, in VirshClosure.__call__(), weakref to VirshPersistent will update the VP.
It will change or modify the slots in VirshPersistent instance, then make the dargs
to next __call__().

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Merge pull request #789 from yangdongsheng/virsh_dict_set

libvirt-virsh: Use weakref from VirshClosure to VirshPersistent.