Donald Trump has sent a letter to the BBC with a threat of legal action after two top bosses – Tim Davie and Deborah Turness – resigned over the way one of his speeches was edited for Panorama.