Do not start async read again if FIFO has no more data
The FIFO reading currently happens in chunks. The current
operation starts reading again even if there is no byte
available instead of waiting. This increases the overhead
of the library needlessly.
The correct thing to do is to wait instead of start reading
again when the last chunk is already handled.
Tested on Windows 8 using the on-board and the USB serial
ports and using Qt4 and Qt5.
Change-Id: I1926b853d1666b273d6d67b4a3f40261f1ed54ff
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>