Fix/improve SerialPort::write() algorithm
Fix/improve SerialPort::write() algorithm

New implementation should minimize the amount of interruptions to
ongoing transfers (only one stop for a short moment is required) and
should unblock the thread at the earliest possible moment.
jasmin-j/distortos,CezaryGapinski/distortos,jasmin-j/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,jasmin-j/distortos,jasmin-j/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,jasmin-j/distortos