Curriculum Demonstration Selection for In-Context Learning