CoGen: Learning from Feedback with Coupled Comprehension and Generation