The US president has gone from urging a ceasefire in Tripoli to threatening to veto such calls in the UN