Donald Trump ally Matt Gaetz has withdrawn his name from consideration to be the next US attorney general.