FreeRDP/FreeRDP — pull request #1460 by akallabeth (2013-09-05 12:50:17+00:00)
Title: Thread handle fixes

Fixes a lot of thread issues within clients, channels and libfreerdp.
What has changed:
* Threads are now properly shut down before shutdown.
* Handles to threads and events are cleared properly.
* ```ExitThread``` called at end of thread functions.
* Removed possible deadlocks in threads (Using ```WaitForMultipleObjects``` to avoid missing thread stop events)
* Added assertions.