Retriever-and-Memory: Towards Adaptive Note-Enhanced Retrieval-Augmented Generation