Recurrence of cancer cell states across diverse tumors and their interactions with the microenvironment