Fokker action of nonspinning compact binaries at the fourth post-Newtonian approximation