The US has ended its military mission in Iraq, a move analysts said could give Baghdad more room for diversified partnerships and indirectly benefit China’s energy and commercial interests.