Phelps’ lemma, Danes’ drop theorem and Ekeland’s principle in locally convex spaces