President Michel Temer, whose popularity is the lowest for a Brazilian head of state in decades and who last week was spared from standing trial on corruption charges by the vote of his allies in Congress, was booed at the conclusion of his appearance at a trade fair in Rio do Janeiro.