Handle exceptions generated from tasks.
Raise exceptions if wait() times out.

Also create another method that returns the events status instead of
raising an exception.
Added condition_wait() to tasks.
Added AtomicEvent class and make use of it.
Added ConditionList class.