Trump’s pick for US attorney-general faced sex-trafficking investigation by department he’s now set to lead