US leader’s farewell trip to Brazil and Peru epitomises Washington’s waning influence