Scientists develop first fabric to automatically cool or insulate depending on conditions