Thread: fix shared_future::get when the shared state is async; refactor the shared_state classes.

svn path=; revision=84607