First-principles calculation on the structure stability, elastic properties and electronic structure of P-doped Mg2Si