Replace select loop in clients with WaitForMultipleObjects

Detailed enhancements:
* Added support for Thread handles in WaitForMultipleObject (relies on ExitThread being called properly)
* Moved async update thread to library removing client specific code
* Replaced *get_fds functions with *get_event_handles functions collecting all relevant event sources
* Replaced select in clients with WaitForMultipleObject