Site-selective electrophilic cyclization and subsequent ring-opening: a synthetic route to pyrrolo[1,2-a]quinolines and indolizines.