Add Task::wait/try_wait() helpers, and remove old ones.

#801.  Mostly semantics-preserving refactoring.