Development and mechanistic investigation of the palladium-catalyzed α-arylation of aldehydes and N-arylation of ammonia