Relation Extraction as Open-book Examination: Retrieval-enhanced Prompt Tuning