Improving Hateful Meme Detection through Retrieval-Guided Contrastive Learning