Structural evolution, mechanical properties, and electronic structure of Al–Mg–Si compounds from first principles