A DFT study of the affinity of lanthanide and actinide ions for sulfur-donor and nitrogen-donor ligands in aqueous solution