replace win32 events by bool variable for request stop of RXthread (Ulli hang bug) (reverse-merged from commit 9159b81849f5192f4f772c80727cbc199b838c8e)
Replace SetEvent(hStop); by EventModify(hStop, EVENT_SET); for compatibility with mingw 3.15.2

mingw 3.15.2  wrong implementation is :

     static inline BOOL ResetEvent (HANDLE x)
{

           return EventModify(x, EVENT_PULSE);

     }

     static inline BOOL SetEvent (HANDLE x)
{

           return EventModify(x, EVENT_PULSE);

     }

Good implementation is :

     static inline BOOL ResetEvent (HANDLE x)
{

             return EventModify(x, EVENT_RESET);

     }

     static inline BOOL SetEvent (HANDLE x)
{

             return EventModify(x, EVENT_SET);

     }