Application of ion-in-conjugation molecules in resistive memories and gas sensors: The role of conjugation