A joint venture will handle control of the TikTok algorithm to comply with federal law that would have banned the app in the United States.