Accessing pyrrolones and pyridinones: controlling 5-exo and 6-endo ring closures in heterocyclic alkynylamides