The House followed the Senate’s lead by extending the African Growth and Opportunity Act until near the end of Trump’s term.