CurES: From Gradient Analysis to Efficient Curriculum Learning for Reasoning LLMs