Allow tasks to be named, and clean up task::atomically.

r? @brson