China frees activist on bail before Xi's trip to United States