The escalating American military engagement in Somalia has led the Obama administration to expand the legal scope of the war against Al Qaeda, a move that will strengthen President-elect Donald J. Trump’s authority to combat thousands of Islamist fighters in the chaotic Horn of Africa nation…