Cancer cell states recur across tumor types and form specific interactions with the tumor microenvironment