Synthesis of aromatic polymers containing anthrazoline and isoanthrazoline units