The same billionaires accelerating A.I. are pouring money into safety research, public-interest tools, health care and economic resilience. Jensen Huang, Dustin Moskovitz, Eric Schmidt and others are spending billions to manage A.I.’s dangers and extend its benefits.