[Test] Add testCancel_thenTask, reproducing cancellation-failure bug.
Fix b3418c5 by using TaskConfiguration class instead of struct & improving then/catch bindings with returning tasks.
Merge pull request #1 from inamiy/future-binding

Improve future binding.