GraphPrompter: Multi-stage Adaptive Prompt Optimization for Graph In-Context Learning