General Theory of Subglacial Cavitation and Sliding of Temperate Glaciers