TikTok officially established a joint venture that would allow it to keep operating in the U.S., the company said Thursday, resolving a yearslong fight to address Washington’s national-security ...