The nomination shows how Donald Trump, still fuming over years of federal investigations that shadowed his first administration and later led to his indictment, is moving to place atop the FBI and Justice Department close allies he believes will protect rather than scrutinize him.