The head of the US Secret Service resigns after admitting failure over the assassination attempt on Donald Trump.