Joint Retrieval and Generation Training for Grounded Text Generation