On the dual roles of ligands in the synthesis of colloidal metal nanostructures.