Asynchronous I/O with QMP Server

Added mutual exclusion when performing a QMP operation to prevent a data coming from the server going to the wrong thread.