Chain of Tools: Large Language Model is an Automatic Multi-tool Learner