Allosteric Cooperativity and Template-Directed Synthesis with Stacked Ligands in Porphyrin Nanorings.