RefTool: Enhancing Model Reasoning with Reference-Guided Tool Creation