Brazil’s re-elected leader now faces a hostile Congress at home and a Trump administration that had bet heavily on his rival.