Tesla said it has resolved its trademark dispute in China which threatened company plans to expand rapidly in the country.