Cavity thermodynamics and hydrophobicity