fixes QubesOS/qubes-issues#1816
Sometimes libvirt crashes. After that the connection (and all vm.libvirt_domain-s) were unusable. fixes QubesOS/qubes-issues#990
This commit eliminates import statements happening in the middle of the file (between two classes definition). The cycles are still there. The only magic module is qubes itself.