virttest.qemu_monitor: Verify hmp cmd in qmp as well

Some QMP's interface will fallback to HMP if there is no
match QMP command, this patch checks HMP before calling
HMP cmd in QMP, to avoid some unexpected failure.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>