virt: Overhaul/expand VirtNet to be more flexible

* List things that were done here

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Add common import to virt_vm

I found a codepath through a unittest which causes
this module to load, before the common module is loaded.
Fortunately the fix is simple, and confirmed by unittest
results.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Remove vm.driver_type

This parameter is only ever actually used for a handful of Xen tests and
checks.  Where referenced, it always came along with a test against the
'hvm_or_pv' parameter.  This patch removes vm.driver_type, removes
the params dict manipulation, and consolidates all use down to just a
new vm.is_xen() method call.  The handful of tests we have which use xen
VM's were also updated.

I also removed a docstring referencing xen for a non-existant function
parameter.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Clean VM class cobwebbs

*  vm.clone() was main user of ``state`` parameter to ``VM.__init__()``.
   However there are only two special-cases where vm.__dict__ also
   needed copying.  Otherwise, we can just make this method part of
   the base class.

*  Consolidated other common attribute creation onto BaseVM class

*  Remove libvirt's vm.vnc_listen parameter, was only referenced once
   and same info can just come directly from params.

Signed-off-by: Chris Evich <cevich@redhat.com>
fixup! virt: Overhaul/expand VirtNet to be more flexible

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Regex strings must begin with r

Signed-off-by: Chris Evich <cevich@redhat.com>
fixup! virt: Overhaul/expand VirtNet to be more flexible
squash! virt: Clean VM class cobwebbs

*  Remove disused libvirt VM.get_shell_pid()
virt: Update VM classes use of virtnet

Signed-off-by: Chris Evich <cevich@redhat.com>
fixup! virt: Overhaul/expand VirtNet to be more flexible

Signed-off-by: Chris Evich <cevich@redhat.com>
squash! virt: Clean VM class cobwebbs

* Clearly define set of attributes needed to re-create an instance's
  state.  Use __getstate__/__setstate__ to help define
  storage/restoration with uniform behavior.

* Check basic, easy things first in needs_restart().  Specific
  and more complicated subclass checks can extend this as needed.

* Move networking initialization into its own method since it
  sometimes needs to be called outside of __init__().

* Remove add_nic()/del_nic() since these steps are now handled
  inside virtnet.

Signed-off-by: Chris Evich <cevich@redhat.com>