Latent transcriptional programs reveal histology-encoded tumor features spanning tissue origins