The Senate voted 74 to 25 to confirm John Ratcliffe, President Trump’s former intelligence director, as director of the C.I.A.