Consistent obligation state locking

State variable is now properly locked to ensure visibility and consistency under happens-before memory models.
It is guarded by the same mutex defined in dereferenceable.

Every class implementing Obligation has been changed according to the new locking policy.
Future with thread safe observers

Standard Ruby Observer module is not thread safe and it has been replaced with a thread safe observer set.
I preferred a copy-on-write set because I don't expect many observers to register, but we can add an option to the constructor to let the user choose the implementation
Future liveness fixed

Changed future spec to use an immediate executor in observers context
Added spec to show deadlock condition when an observer tries to access the future: this has been fixed using an open-call policy
Code duplication between future and scheduled task has been refactored pulling up common code into Obligation
Extracted safe task executor to remove further duplication
Fixed CopyOnWriteObserverSet locking policy
Obligation @reason is now properly guarded by mutex
fixed Obligation#value

Obligation#value now waits correctly when state is not completed
Added unit test for Obligation
added count down latch class, inspired by java.util.concurrent.CountDownLatch
fixed non-deterministic event spec

Due to an improperly synchronized array, event spec sometimes fails; this issue has been solved using a count down latch instead
scheduled task fixing and refactoring

general class refactor
fixed add_observer when state is unscheduled
fixed cancel when state is unscheduled
ScheduledTask better thread-safeness

removed Observable module and added the thread safe CopyOnWriteObserverSet
code refactoring
common code between future and scheduled task refactor

pulled up common future and scheduled task code into Obligation
added specs for new obligation methods
Change how rescues are handled

Always add a Rescuer to the list, then call try_rescue on the whole
rescuers list if the Promise isn't pending anymore.
Merge pull request #11 from gcapizzi/change_rescue_handling

Change how rescues are handled
Merge remote-tracking branch 'upstream/master'