Liquid-state theory and the renormalization group reconciled: A theory of phase transitions in fluids