The US Senate has confirmed John Ratcliffe as CIA director, giving President Donald Trump the second member of his new Cabinet.