RECOST: External Knowledge Guided Data-efficient Instruction Tuning