The US Senate has confirmed Gina Haspel, who was involved in torturing suspects at a black site in Thailand in 2002, as the new head of CIA.