A new synthetic approach to macrocyclic molecules and main-chain polymers containing carbazole moieties