pre/post-process: Don't unpause VM if it was already paused

On my test case, I want to get a paused VM and I won't ever need to
unpause it, so I set paused_after_start_vm=yes. The image check code,
however, was unconditionally unpausing the VM, and this is a bug.

This changes the process() code to pause/unpause the VM only if it was
not yet paused.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
env_process: separate VM class lookup from object creation

The VM class lookup will be moved somewhere else.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
env_process: Move VM class lookup to a separate function

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
env_process: Import VM class modules on demand

Instead of importing every single VM type module, just import the
modules that are going to be used on demand, depending on vm_type.

The only exception by now is libvirt_vm, that is also used for the
libvirtd_restart() call at preprocess().

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Move VM class lookup to BaseVM class

This way it can be reused elsewhere. This keeps the on-demand loading of
vm_type-specific modules.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Move VM creation/registration code to Env class

This way, other code can easily create/register a VM object manually if
necessary.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_monitor: Make both monitor subclasses provide a human_monitor_cmd() method

This way we can write test code that use HMP commands without worrying
if the actualy monitor is a QMP or HMP monitor.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_monitor: Add info_numa() method

Unit test for the response parsing included.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Add test module for the QEMU "-numa" option parsing

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>