MASS: Mathematical Data Selection via Skill Graphs for Pretraining Large Language Models