Influence of tetragonal distortion on the magnetic and electronic properties of the Heusler compound Co2TiSn from first principles