A Survey on the Optimization of Large Language Model-based Agents