kill the last remaining select() in libfreerdp
transport_read: ensure stream buf size >= pdu size

Without this check a simple nc < /dev/urandom server:3389 could
kill the server instantly.
winpr: CloseHandle did not release the thread TCB

This resulted in huge memory leaks - 8MB per thread, depending on
the system's default stack size.
The leak happend even if CloseHandle() was correctly used to "detach"
the thread but WaitForSingleObject was never called.
Merge pull request #1954 from nfedera/fix-2014-07-10-01

transport_read: ensure stream buf size >= pdu size
Merge pull request #1955 from nfedera/fix-2014-07-10-02

winpr: CloseHandle did not release the thread TCB
Merge pull request #1950 from hardening/kill_select

kill the last remaining select() in libfreerdp
Added internal thread list to allow setting a event, when a thread
is ready to join. This way WaitForMultipleObjects is able to wait
for thread events and the portability problems with pthread_timed_join_np
are gone.
Replaced libfreerdp functions returning file descriptors with versions
returning event handles.
Fixed type, now setting event on ExitThread.
Moved async update thread from client to library.
Now closing thread handle before exit.
Update thread moved to library.
Now using WaitForMultipleObjects blocking for main loop.
Updated android client, using WaitForMultipleObjects now in main loop.
Removed update thread, provided by library now.
Mutex trylock now using maximum time difference allowed to decrease polling.
Error handling fixes.
Added input queue event handler to wait.
Implemented _GetCurrentThread function.
Added debug messages for not implemented functions.
Updated sample applictaion.
Updated directfb client.
Removed obsolete get_fds functions.
Fixed freerdp_get_event_handles, getting always now.