Move brings to an end two-month saga that has plunged the Lion City’s ties with Beijing to a low point, but shipping company responsible faces legal action