Intramolecular palladium-catalyzed aryl amination and aryl amidation