xfreerdp-server: make use of winpr synch and thread apis