The foundation — sustained for years by donors outside the Trump family — never obtained the registration that New York requires to solicit money from the public, state officials said.