The Donald J. Trump Foundation agreed to dissolve “under judicial supervision” on Tuesday, as part of the New York State attorney general’s lawsuit against it alleging illegal conduct and “unlawful political coordination” to benefit President Trump's personal and business interests.