Add improved when_all/wait_all

This pull request adds new implementations of `when_all` and `wait_all`. The new versions are more efficient than the existing ones. They employ implementation techniques very similar to dataflow which has shown to be efficient and robust. This fixes #1278: Implement improved when_all/wait_all.