US Special Counsel Jack Smith has resigned from the Justice Department after the failure of his two federal cases against incoming president Donald Trump.