Self-Demos: Eliciting Out-of-Demonstration Generalizability in Large Language Models