Pair potentials and the bonding energy of d-band metals