First principles calculations of structural, electronic and optical properties of various phases of CaS