Trump foundation agrees to dissolve amid lawsuit