qemu_devices: Differentiate between hotplugged and clean VM

Support differentiation between clean and hotplug-clean VM; state:
-1 = Clean VM with all devices defined during qemu create
 0 = Clean VM with hotplugged devices
>0 = Dirty VM (hotplug operation failed or unverified)

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu_devices: Add device to the bus which it contains

Store the bus' device into bus.__device. This is required by hotplug
patches.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu_devices: Use exceptions in remove and hotplug

Use DeviceXXXError to generate similar exceptions in hotplug, remove
and insert.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu_device: Hot-unplug inplementation

Hot-unplug (unplug) implementation was kind of tricky. It allows to
verify, what should be removed from implementation and if it's possible
to remove the device.

There are many differences between devices, which needs to be taken care
of in each device. Following patches will show the use of get_children,
unplug_hook and unplug_unhook.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu_devices: Custom unplug handling of disk device and drive bus

When drive is hot-unplugged, disk remains in the VM and the drive is set
to ''

When disk device is hot-unplugged, related drive is also removed.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu_devices: Fix addr bug in QSparseBus

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
REMOVEME: qemu.tests.qdev_example_test: Add unplug part

A demonstration of unplug support. Between phase1 and 2 shouldn't be any
VM recreations. (in case you don't specify allow_hotplugged_vm = no
in params)

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>