Terahertz emission from transient currents and coherent phonons in layered MoSe2 and WSe2