Optoelectronic and thermoelectric properties of A3AsN (A = Mg, Ca, Sr and Ba) in cubic and orthorhombic phase