Similar Items: Data Foundations of Long-Context Language Models: A Survey