President Donald Trump has signed an executive order finalizing the terms of a deal to bring TikTok's US business under American control.