Synthesis of Condensed Heterocycles by the Gould–Jacobs Reaction in a Novel Three-Mode Pyrolysis Reactor