LLM-based Agents for Automated Confounder Discovery and Subgroup Analysis in Causal Inference