I believe I have the best answer...OK...the best opinion.
Has anyone thought about the the fact that R2 had alot of adventures between E3 and E4. His memory could have been wiped at least once during that time period not seen in the movies. Plus, after a certain amount of time, isn't it possible that his procesor dumps information. You have to remember at the time of E5, Artoo is nearly a 30 year old droid.
Also. in E4 the little droid was shot in the head which could have erased some data. Then in E5 he was swallowed and spit out by the bog beast after they crashed on dagobah, which could also have screwed up some of his circuits.
IMHO, whether he remembered anyone or not, I think Artoo knows how to keep his mouth shut. Droids are like pens. Some of them looks exactly alike, but it is NOT the SAME pen. I believe that is why most people don't look at the him and say, "R2-D2, is that you?" However, if Artoo keeps his mouth shut he doesn't run the risk of getting himself blasted. Plus if people knows that he knows alot, he may have to give a freakin' dissertaion about everyone he remembers.
Heck, I have been out of HS for 20 years and some of the people I hung with and things I did are fuzzy to me.