The Regulation of Cooling and Star Formation in Luminous Galaxies by Active Galactic Nucleus Feedback and the Cooling-Time/Entropy Threshold for the Onset of Star Formation