Smart Card Improvements, TS Gateway non-blocking Writes Integration

Smart Card Improvements:
* Restructure code to split decoding from processing
* Dispatch IRPs to threads matching smart card context
* Implement basic SCardAccessStartedEvent support

TS Gateway non-blocking Writes Integration:
* Fix compilation on Windows
* Fix build warnings on Windows
* Fix usage on windows (tcp_new failure)