US president-elect Donald Trump has thanked Ford for its decision to cancel a new plant to make small cars in Mexico and for creating new jobs in the US.