The US Senate has confirmed Chris Wright, a fracking executive, to be President Donald Trump's energy secretary.