A new trade agreement has been agreed between the US, Canada and Mexico to replace the NAFTA pact.