Windows: Fix crash on QMqttClient destruction


On Windows, sending DISCONNECT might return data before the
QMqttConnection is destroyed, causing it to invoke on bogus QMqttClient
members.

Hence, set a flag to avoid this event, but still aim to send a
disconnect to the broker to nicely quit.

Fixes: QTBUG-111846
Pick-to: 6.5 6.4 6.2
Change-Id: Ia94865c9b404ecbd814150c313679aa10b3f6aa0
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
commitc04b21a2dcce46047bc08c9a833ca78ee43ee41c
parentdfbb02ed03dc1a68c4a1c71df0afcdfcb9034d1c
authorMaurice Kalinowski <maurice.kalinowski@qt.io>
committerMaurice Kalinowski <maurice.kalinowski@qt.io>
commit timeThu, 30 Mar 2023 11:54:01 +0100