Python libs: close console sockets before shutting down the VMs
Currently, the console socket on QEMUMachine is closed after the QMP
command to gracefully exit QEMU is executed. Because of a possible
deadlock (QEMU waiting for the socket to become writable) let's close
the console socket earlier.
From: Eduardo Habkost <firstname.lastname@example.org>
Signed-off-by: Cleber Rosa <email@example.com>