Chinese tech giant ByteDance has signed an agreement to sell a majority stake in its video platform TikTok to a group of U.S.