Windows: Fix false ResourceError triggering for CDC ACM devices

When transmitted data to the USB serial port of the class CDC ACM, is
triggered an unexpected TXEMPTY event, which we didn't add to a mask of
events in SetCommMask(). In this case handler processCompletionRoutine()
interpreted it as ResourceError.

This DCD ACM devices over USB connection using the Microsoft USB serial
driver (usbser.sys). Thus, allegedly, this behavior identical for all
standard CDC ACM devices on Windows.

Solution - check on unexpected EV_TXEMPTY flag and immediately return
true from processCompletionRoutine().

Thanks to Josh Handley.

Task-number: QTPLAYGROUND-22
Change-Id: Iac3eccc79e243e5bbf1a34cd44458c9ad265a5db
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Windows: Fix no longer receive data after EV_TXEMPTY triggered for CDC ACM device

A previous patch

* SHA1 ID: 2bcac223e64599eb74889975053f6547000b13cb

introduced a regression: after triggering of EV_TXEMPTY a reception of
data is stopped. The reason for this was an immediate return from the
handler processCompletionRoutine().

The solution - do not do an immediate return and let to call method
startAsyncRead().

Thanks to Dan

Task-number: QTPLAYGROUND-22
Change-Id: I1a6b358e6bbaba94527dc9db98a2ab046a8c6f05
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I08b51226675178ae62fa93c91bc8dd04d18bd62f
Use debug_and_release_target for mixed release and build selection

It is more appropriate as it is a more abstract use case than just tightening it
to Windows.

Change-Id: I60d0ea472299b3048ad6762512d632d010366f95
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix an erratic name of enum "Rate" on "BaudRate" in Q_ENUMS macro

Change-Id: I74ceefbb108c142fe260a5c86a9f610b0de91cde
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Enums intended as flags is moved to Q_FLAGS() macro

Task-number: QTBUG-31964
Change-Id: I771ace406cc549e9c48d84fe90974487202ee14b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I58d9e479c9b8e5cd138a4f8bf501ad3f39177345