Losses from heat and drought have cut production forecasts in Brazil and Vietnam, the world’s largest coffee growers.