Thermodynamic potentials and distribution functions. II: The HNC equation as an optimized superposition approximation