President-elect Donald Trump's nominee for attorney general, Matt Gaetz, was under criminal investigation before he resigned from Congress.