Climate change has been central to the good times and instrumental to coffee’s discouraging prognosis in Indonesia, the world’s fourth-biggest producer. Crop shortfalls around the globe drove an epic advance last year in the price of beans, a rally that’s cooled in recent months along with retreats in commodity prices.