Agent-FLAN: Designing Data and Methods of Effective Agent Tuning for Large Language Models