AutoPDL: Automatic Prompt Optimization for LLM Agents