Backport Vladimir's QMP changes
For qemu.git, we've reworked legacy.py very slightly alongside a larger change to ensure that most callers are using the error-checking interface for QMP. Bring those changes here to keep things in sync.
For qemu.git, we've reworked legacy.py very slightly alongside a larger change to ensure that most callers are using the error-checking interface for QMP. Bring those changes here to keep things in sync.