core: wrong order of inserts when processing extrenally managed vms

When we attempt to insert discovered vm we get:

insert or update on table "vm_device" violates foreign key constraint
"fk_vm_device_vm_static"

which means that we need to insert VmStatic first and VmDevices later.

Bug-Url: https://bugzilla.redhat.com/1135959
Change-Id: I20230e23ca61f90b47a01ad9bd482a6fa7bf4b30
Signed-off-by: pkliczewski <piotr.kliczewski@gmail.com>