Lattice dynamics and elasticity in thermoelectric Mg2Si1−xSnx