Laser cooling of YbF molecules for an improved measurement of the electron electric dipole moment