Mechanism of the Nenitzescu indole synthesis and its utilization for the preparation of carbazoles