Fix a regresison in the waitForXXX() methods on Windows
Fix a regresison in the waitForXXX() methods on Windows

A regression was introduced by commit
893173f9d562f312ce51f00c07eef4ae0f1a0212: call to waitForXX() method
always fails.

The reason is in that earlier we always had a three valid handles of I/O
events, which are passed to the WaitForMultipleObjects() function. But
after that commit, we can have up 1 to 3 created handles, depends on the
I/O operation. In this case, we also passes a three handles to the
WaitForMultipleObjects() function, but some of them are non-initialized.
This lead to the WaitForMultipleObjects() always returns with the
ERROR_INVALID_HANDLE error code.

Thus, we need transfer to the WaitForMultipleObjects() only active
event handles.

Change-Id: Idc0d98e781506dd30011d4e50f53e06e2776ed52
Reviewed-by: Sergey Belyashov <8871b4c2d635fca691211507eadbac3d0bc2695a@gmail.com>

RoadWorksSoftware/QtSerialPort-OS2,RoadWorksSoftware/QtSerialPort-OS2