Smartcard in ThinLinc environment

Detect if we're are into a ThinLinc session runs from a windows client.
Tested successfully in those environments : 
1/ Linux Ubuntu (xfreerdp) => Remote Windows Machine
2/ Linux Ubuntu => Thinlinc Server (xfreerdp) => Remote Windows Machine
3/ Windows Machine => ThinLinc Server (xfreerdp) => Remote Windows Machine

I noticed that removing the line #1476 (states[j].dwEventState &= 0xFFFF;) in winpr/libwinpr/smartcard/smartcard_pcsc.c also worked for the 3 environments above (at least with my reader & middleware) but
as maybe this masking could be important for others I prefer detect If we're in a thinlinc environment runs from a Windows client.

If it appears that _all_ clients can live without "states[j].dwEventState &= 0xFFFF;", perhaps we could remove all the ThinLinc specific code. 
Like @bmiklautz I don't like very much the "hack" to detect ThinLinc client, I'd rather have that outside and add the ability to set a flag to disable  states[j].dwEventState &= 0xFFFF.