qemu: Add option to shutdown gracefully
Having finished a test, autopkgtest-virt-qemu cleans up by sending SIGTERM to the qemu process. In general, this is the right thing to do, as it is fast and should not have any side effects, as that particular VM is longer needed.
However, there is at least one case where a side effect was discovered: when passing in a GPU (as the Debian ROCm Team does) into the test environment via vfio-pci, terminating the qemu process with SIGTERM can leave the GPU in an irrecoverable low-power state even the host cannot recover from, requiring a host reboot.
Going through the full shutdown process seems to resolve this issue.