Cavity thermodynamics and surface tension of water