How TikTok’s Chinese owners took firmer control ahead of US ban