Detroit got closer to resolving its record $18 billion municipal bankruptcy, reaching a deal with the insurer of taxpayer-backed bonds on how to treat debt holders.