Fix reading of data remainder with CDC USB device on Windows


In some cases the WaitCommEvent function does not triggered,
even if the input driver's queue has an unread bytes. Most
likely this happens if a bytes has been arrived between calls
of ReadFile and WaitCommEvent. Thus, it can be avoided by means
of ClearCommError function which should be called in end of
ReadFile to require amount of bytes that has been arrived but
still are unread. If it returns more than zero, then we start
reading again, without calling of WaitCommEvent.

Task-number: QTBUG-48677
Change-Id: I054975971a7c1823f7de879669c3d97f31348ed8
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commit4679301c184b7964fd197cca5bf5b30fefaee386
parent9a70ee2389d3302f6a4262325f8a76e4d867b478
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeWed, 27 Apr 2016 15:53:00 +0000