TikTok has won temporary relief in Canada after a federal court overturned a government order that sought to shut down its operations.