US President Donald Trump has signed an executive order formally withdrawing the US from the Trans-Pacific Partnership (TPP) trade deal, following through on a promise from his presidential campaign.