libvirt: virsh_edit: Add maximum option for vcpucount

* In RHEL-6, vcpucount --config option must be used with --maximum
  or --active option, using only --config option with cause error:

  > virsh vcpucount virt-tests-vm1 --config
  error: when using --config, either --maximum or --active must
  be specified

* The vm need to backup with '--inactive' option to avoid xml
  inconsistence.

* No need to disable pylint E1111

* Fix some pylint/pep8 problem.

Signed-off-by: Liu Hao <liuhaonk@gmail.com>
virsh_change_media: Backup and restore original vm xml

* In new_from_dumpxml(), the used keyword argument 'options'
  doesn't exist in virsh.dumpxml(). This must be a typo
  s/options/extra.

* Fix a raise typo and some pylint/pep8 issues.

* The original xml of the vm need to be backed up before test
  and restored after it to keep the xml unchanged.

* When backing up, the xml need to be dumped using '--inactive'
  option. Otherwise the xml backup is slightly different from
  the original one like below. I'm not sure this will cause
  any problem, but it's annoying.

---
+++
@@ -4,6 +4,9 @@
   <memory unit='KiB'>1048576</memory>
   <currentMemory unit='KiB'>1048576</currentMemory>
   <vcpu placement='static'>2</vcpu>
+  <resource>
+    <partition>/machine</partition>
+  </resource>
   <os>
     <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
     <boot dev='hd'/>
@@ -43,7 +46,9 @@
     </console>
     <input type='tablet' bus='usb'/>
     <input type='mouse' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes'/>
+    <graphics type='vnc' port='-1' autoport='yes'
listen='127.0.0.1'>
+      <listen type='address' address='127.0.0.1'/>
+    </graphics>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
@@ -52,4 +57,5 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
     </memballoon>
   </devices>
+  <seclabel type='dynamic' model='selinux' relabel='yes'/>
 </domain>

Signed-off-by: Liu Hao <liuhaonk@gmail.com>