Fixed channel closing before waiting for thread to quit.
Merge pull request #1458 from akallabeth/microphone_fixes

Fixed issue #1281, thread shutdown now properly waiting for quit.
Fixed duplicate WaitForSingleObject on client thread.
Fixed malloc warning, now casting to void *.
Fixed invalid event number.
cmake: add target helper functions
Merge branch 'master' of github.com:awakecoding/FreeRDP into xrdp-ng
libfreerdp-core: fix server-side licensing sequence
Added proper thread sync for input thread.
Channels thread now listening to message pipe quit signal posted
when shutting down the channel.
Fixed input thread shutdown caused by previous commit.
Fixed smartcard related issues with double free.
Fixed double free.
Reverted accidental commit.
Fixed unchecked free in glyph.c (related to #1428)
Fixed NULL check in freerdp_device_collection_find
Merge pull request #1461 from akallabeth/clang_warning_fixes

Fixes clang warnings ```Allocator sizeof operand mismatch```
Merge pull request #1462 from akallabeth/device_collection_find_fix

Fixed NULL check in freerdp_device_collection_find
Fixed command line parser, now printing help, if an invalid option is detected.
Fixed optional argument parsing.
x11/client: win8/server 2k12 fix for kbd sync

Keyboard indicator sync (caps lock/num lock/..) didn't work properly
on reconnect for windows 8 and windows 2012 server.

fixes #773