Hot-electron cooling by acoustic and optical phonons in monolayers of MoS 2 and other transition-metal dichalcogenides