Tesla issued a recall affecting more than 9,000 of its Model X vehicles over concern parts of the car’s roof could fly off.