URaG: Unified Retrieval and Generation in Multimodal LLMs for Efficient Long Document Understanding