Ab initio lattice dynamics and piezoelectric properties of MgS and MgSe alkaline earth chalcogenides