Do not emit bytesWritten() while data aren't transferred

The serial port very slow device therefore the system
call write() doesn't guarantee that data were transferred
completely to the device. It guarantee only that data were
sent to the driver from the user space.

Thus it is wrong to emit the bytesWritten() signal at once
after successful writing.

The correct solution is to store the number of transferred
data in some variable (e.g. pendingBytesWritten in this
case) and to wait for the next notification from the
WriteNotifier that the write FIFO of device is empty (i.e.
when all data were really transferred) and ready to
transmission of the next portion of data.

Also good decision is to divide a data transfer operation
into two methods: startAsyncWrite() and completeAsyncWrite(),
similar with the Windows implementation.

Where the startAsyncWrite() invokes the write() system
call, and the completeAsyncWrite() is invoked by a
writeNotifier to complete writing operation or start a new
startAsyncWrite() operation.

Tested on Arch Linux 64 bit with the on-board and the USB
(PL2303) serial ports with use Qt4 and then Qt5.

Change-Id: I1c274b2052a9bd54811586c6f1cfdf080b400263
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>