core: handle nic ordering when adding or importing a VM

This patch handles the NIC ordering when creating or importing a VM, as follows:
1. When creating a VM from template
 a. If the template has PCI addresses, then sort the NICs according
to that, allocating MAC addresses with the same ordering
 b. If the template doesn't contain PCI addresses, allocate MAC
addresses with an ordering identical to the naming of the NICs
2. When creating a VM from snapshot
 a. Follow logic in 1a.
 b. If the snapshot doesn't contain PCI addresses, but it does contain
the MAC addresses, allocate new MAC addresses with the same ordering as
in the original snapshot
 c. If no PCI and no MAC addresses are available, order by the NIC name
3. When importing a VM - same as VM creation (but no template in this
case, just the exported VM is the reference to compare to).

Change-Id: I46b4ffc4ecaab824b90bf8b8ecdfe4ebad3074bf
Bug-Url: https://bugzilla.redhat.com/1040630
Signed-off-by: Oved Ourfali <oourfali@redhat.com>