libvirt-test: Backup virsh_change_media xml and fix virsh_edit.

* Added backup and restore for vm in virsh_change_media.py.
* Fix virsh_edit.py to get consistent result in earlier version of libvirt.
* Fix a PEP8 in virsh_edit.py