Synthesis and optical and electrochemical memory properties of fluorene–triphenylamine alternating copolymer