AdaptMI: Adaptive Skill-based In-context Math Instruction for Small Language Models