Ab initio periodic approach to electronic structure and magnetic exchange in A2CuO2X2 (A=Ca, Sr and X=F, Cl) High-Tc superconductor parent compounds