Structure-R1: Dynamically Leveraging Structural Knowledge in LLM Reasoning through Reinforcement Learning