Electronic states of CdIn2S4 and of other II–III2–VI4 compounds: How sensitive are they to the crystal structure?