There were growing signs that US military action on Iran might be imminent, then the US president suddenly changed his tune.