Capability-aware Prompt Reformulation Learning for Text-to-Image Generation