The US is threatening to impose sanctions on Turkey if it does not cancel a deal to buy a Russian S400 missile defence system.