editor: move waitForReadyRead into ClientSocket::recv

We want our recv method to act like a blocking call, so let's
wait if there's not sufficient data available.