Iraq, U.S. near deal on military future