South Carolina's record-breaking measles outbreak, the largest in the US in decades, has officially ended after nearly 1,000 cases and 21 hospitalizations over six months.