c: Unify behavior of event_set between Windows and PThreads

On Windows a manual-reset event is used. On SetEvent it will weak up
all waiting threads. But pthread_cond_signal will only wake up one of
the waiting threads. Use pthread_cond_broadcast instead to unify the
behavior of event_set.

This different did not actually matter because there is at most one
thread waiting for a given event at the same time.
c: Remove memcpy from queue_put and make all callers pass allocated memory
c: Remove unused error checking from semaphore_create