Synthesis and characterization of bipolar copolymers containing oxadiazole and carbazole pendant groups and their application to electroluminescent devices