Kevin Mayer has quit as CEO of TikTok after the company came under sustained pressure from the Trump administration over its ties to China.