Reinforcement Learning-Based Prompt Template Stealing for Text-to-Image Models