Variable-speed, water-cooled chillers and heat pumps