Latham’s closure of its Shanghai office marks the trend of American law firms scaling back their businesses in mainland China in recent months.