The app’s China-based parent company is mounting a legal challenge against a law forcing it to sell its US assets or face a ban.