Palladium-catalyzed and electrophilic cyclization approaches to carbocycles and heterocycles