delay: fix possibile races
future: fix possible races and add cancellation
promise: fix possible races
delay: add some documentation
future: add some documentation
promise: add some documentation