Adapt in Contexts: Retrieval-Augmented Domain Adaptation via In-Context Learning