Mechanism of the pressure-induced wurtzite to rocksalt transition of CdSe