The invar effect and phase transitions in Cs2ZnI4 crystals