iotests.py: Add qemu_nbd function