QMP: handle_qmp_command(): Move 'cmd' sanity check

Next commit will change how query commands are handled in a
way that the 'cmd' sanity check is also going to be needed
for query commands handling.

Let's move it out of the else body then.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
