virttest: Fix network xml sync with state unchanged

When using original sync of NetworkXML class to restore a backup
network, it is redefined and started, leaving autostart disabled.
This is not the default setting (all true for active/persistent/
autostart) for the network.

In this modification, we set the default behavior of sync to
set all state to true. With the help of an optional "state" dict
parameter, we can restore the network to any state you like, or
in practical, to the state we backed up.

To facilitate this backup & restore process, I also added a helper
function state_dict() to retrieve a active/persistent/autostart
dict for backing up current vm state.

The unittest for these network manipulators is given in a new file
instead of libvirt_xml_unittest.py to separate manipulator tests
from XML base test.

Furthermore, the net_state_dict function use an outdated way to get
the persistent property for the network, which is already changed
by a patch (commit 895913d) in libvirt-0.10.2. The persistent status
can be retrieved from net_list directly. So I add a condition to
ensure it can be backported for older libvirt while avoiding
redundant call of net_autostart when testing on new libvirt.

This backport can be removed if old libvirt no longer maintained.

Signed-off-by: Hao Liu <hliu@redhat.com>
@yangdongsheng, Now I really understand what sync() should be doing.
I assume the history of this function is like following:
1) sync(): I'm used to update network with the new XML.
2) test writer 1: I need to backup my network and restore it after test. I found sync() and it works very well.
3) test writer 2 (me): No, it isn't. It didn't recover status which is not recorded in XML. I need to make it do this.
4) sync(): I'm used to update network with the new XML and blabla.

I think what we really need is a package dedicated for store and recovering status. like
```
network = NetworkState()
network.backup()
try:
    # Do something.
    ...
finally:
     network.restore()
```
to substitute the mistaken usage of sync() in libvirt_xml.