The U.S. Senate has confirmed Pam Bondi, President Donald Trump's choice for attorney general, to head the justice department.