Text this: Retrieval-Augmented Generation for AI-Generated Content: A Survey