DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Task