On the Noise Robustness of In-Context Learning for Text Generation