Refactor functionality of the loopBack test
Refactor functionality of the loopBack test

Testing of a single port with connected Tx and Rx pins doesn't
make sense since:

* It is necessary existence of a real physical port.

* It is impossible to set different speed for transmission
  and reception (in common case).

Now the new test is deprived of these problems, it can reveal
real mismatch of speeds.

(cherry-picked from e07a665edef5a238e3f1b948bc3f5e3e244f2ab2)
Change-Id: I1c60a373b60198d9aa9cefc329c0817981232de8
Reviewed-by: Denis Shienkov <6a9c747bd2ba446682324cf340d3b86f30cf4d55@gmail.com>

RoadWorksSoftware/QtSerialPort-OS2,RoadWorksSoftware/QtSerialPort-OS2