The deal is a major step toward resolving years of uncertainty about the short video app’s future in the United States.