Some generalizations of Ekeland's variational principle with applications to fixed point theory