Electronic properties of the Mg2Si thermoelectric material investigated by linear-response density-functional theory