Phase transitions and electrical conduction in thermal energy storage compound (n-C12H25NH3)2CdCl4