TikTok has secured its future by agreeing to split the US app from the global business. But the deal will spark changes to how the app's algorithm works.