fix "half-open connection detected" race condition
fix buffer leak when sending rdp control messages
fix buffer leak when receiving an rdp NUL segment