Statistical thermodynamics of polydisperse fluids