An ultracold molecular beam for measuring the electric dipole moment of the electron