libfreerdp-core: fix random TS Gateway disconnects with async modes