The Chinese-owned social media giant will divest its U.S. entity to a joint venture controlled by American investors.