libvirt.tests: Fix network persistent bug.

On older libvirt, defining an exist network will cause failure,
but for latest libvirt, it allows to define exist network if
this network is transient.
So on older libvirt, network will be erased after network testing.

Function sync(...) can solve this problem for both versions.