virt_utils: Rewrite network/nic management

virt config: New universal virt. networking configuration
unit tests: New virt_utils_unittests tests

New Class: PropCan
    Allow container-like access to fixed set of items (__slots__)
    This allows NIC/Net handling code to lock-down a fixed set of
    parameters relevant to a vm_type / driver_type combination.
    Data is accessible in a dictionary-like manner or as object
    properties, however empty or None value items will pretend to
    not exist.  The special empty/None handling optimises access
    and storage by only representing values containing meaningful
    data.

New Class: Base_VirtIface
    Networking information for single guest interface and host
    connection.  This is an abstract base-child-class of PropCan
    containing the minimal amount of networking keys needed, along
    with some basic name and mac address handling methods.  Some
    amount of effort is made to ensure stored mac address data
    is in an expected format - two ASCII character hex-byte
    representation, separated by :'s, six or less bytes in total.
    Complete mac addresses are generated by filling in missing
    trailing bytes from a sequential pool maintained as a class
    variable.  Sequential byte generation used to ease unit testing.

New Class: Libvirt_VirtIface & KVM_VirtIface
    Specializations of Base_VirtIface parent class (and PropCan)
    with networking keys specific to Libvirt or KVM respectively.
    If a new type or variation is needed, simply subclass Base_VirtIface
    and update the VMNet_Style.VMNet_Style_Map as needed.  The new or
    variant class will be used automatically based on resolving
    vm_type, and/or driver_type from the supplied Params dict (see
    other classes below)

New Class: VMNet
    Abstract base-class collection of networking information, stored
    within a particular container class (e.g. a subclass of
    Base_VirtIface). This class behaves like a list of PropCans.
    It may be initially empty or created from a list-like container
    of dictionary-like objects holding key/value pairs of networking
    data.  Items within a VMNet instance are indexed by number and
    the 'nic_name' value of each contained item.  Consequently, the
    'nic_name' key is required for each contained item, and it's value
    must be hashable. Updates to the 'mac' value of each item is handled
    specially, in that storage of incomplete byte lists, and/or values that
    do not pass the container class's mac_is_valid method,
    will not be stored.

New Class: VMNet_Style
    Make decisions about needed info from vm_type and driver_type params.
    The VMNet_Style_Map class variable is utilized for initial setup of
    VMNet derivatives (see below).  Essentially it helps provide a
    container-class type based on the contents of Params dict-like
    values for vm_type and driver_type.  It also establishes a mac
    address prefix to be used when generating MAC addresses.  However,
    any number of additional VMNet instance variables may also be set
    with default values.  The special 'default' keys are utilized when
    vm_type and/or driver_type don't match from Params.

New Class: ParamsNet
    VMNet sub-class specialized for initialization from a Params
    dict-like instance.  Essentially it filters out and initializes
    all networking info. for a particular VM.  Once initialized,
    networking information is accessed by NIC index or it's name (e.g.
    'nic1', 'nic2', etc.) in a dictionary-like or object property-like
    manner.  For example, instance[0].mac, instance('nic1').mac,
    instance['nic1']['mac'], etc.  Each nic object will be stored in
    the proper container class as determined by the VMNet_Style class.
    A utility generator method is provided for iteration over all
    VM's and NIC's mac address params definitions.  This makes validating
    or checking for mac address conflicts easy.

New Class DbNet:
    VMNet sub-class specialized for initialization from a database.
    Essentially analogous to ParamsNet, with a set of database
    management and locking methods.  Database items are hashed by the
    key provided at initialization time, so hash-clashes must be managed by
    implementation code.  Changes to any indexed NIC object automatically
    result in atomic database updates.  This also follows for any re-ordering
    or deletion of contained items.  The lock/unlock methods must be called
    externally prior to any database activity.  Also provides a utility
    generator function for iteration over all MAC addresses contained
    within the database.

New Class: VirtNet (Re-write former networking code)
    Multi-inheritance of the ParamsNet and DbNet classes providing
    mediated networking info. management behavior combination of both.
    Provides the former generate_mac_address(), free_mac_address,
    set_mac_address(), and get_mac_address() functions, which behave
    exactly as before.  The only exception is the 'instance' parameter
    is no-longer required as it is established at initialization time.
    Setting and Freeing of arbitrary mac addresses is allowed (as
    before), however generation of new mac addresses is a sieve over
    cached values.  Deleting the database cache or freeing individual
    NICs MAC addresses will extend the pool within the confines of any
    mac prefixes defined by the responsible VMNet_Style definition.  A
    utility generator is provided which wrapps the mac_index generators
    from ParamsNet and DbNet (in that order).  This permits iteration
    over all known MAC address values possible.

Signed-off-by: Chris Evich <cevich@redhat.com>
Merge branch 'master' into virt_utils_net_rewrite