qemu.tests: add qemu_io tests

qemu_io test uses 'pre_command'/'post_command' to create/remove
loopback device, but it can't handle exception, if some cmd goes
wrong, the loopback devices would be left with used status.
This patch add a new class to create/cleanup loopback device
for qemu_io testing.

This patch also update 'script/qemu_iotest.sh' script, make it
create snapshot file in '/tmp' directory, instead creating file
in '/dev' dir.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>

Add case depends on exist bugs to regression function.

Udpate code style in regression.

Add missing for loop in regression.

Signed-off-by: Feng Yang <fyang@redhat.com>

The test_image is used to specify the image name to be tested. We could
also pass the raw device such as /dev/XXX to do teh qemu_io test.

Signed-off-by: Jason Wang <jasowang@redhat.com>

Current qemu_io.py launch qemuio_test.sh through kvm_subprocess.run_fg()
which does require an timeout value which default is 1 second. This patch
use 1800s.

Signed-off-by: Jason Wang <jasowang@redhat.com>