Trump’s former personal lawyer narrowly confirmed as US attorney general