China's yuan sinks to six-year low, then erases losses