First-principles calculations of the electronic, optical and elastic properties of CdIn2S4 thiospinel at ambient and elevated pressure