mod/x11: detect logoff/shutdown from wm

The current solution is rather unix centric since
WaitForMultipleObjects doesn't not work with process HANDLEs yet.
rds: added logoffusersession call