Todd Blanche has been sworn in as US attorney general after a narrow, contentious Senate confirmation vote.