The agreement requires TikTok's American assets to be transferred to U.S. owners from China's ByteDance, potentially resolving a saga that has lingered for nearly a year.