Constraints from Comets on the Formation and Volatile Acquisition of the Planets and Satellites