Event potential concurrency issues

Event class has some potential concurrency issues.
`Event#set?` was not synchronized, causing inconsistent visibility under happens-before based memory model (like JRuby and Rubinius)
`Event#wait` was using an array to store enqueued threads and `Event#set` woke up them: a `ConditionVariable` is best suited in those cases and solves some check-then-act issues of the original version

All test are still passing