CoPS: Empowering LLM Agents with Provable Cross-Task Experience Sharing