A gift from Stanford alumnus Evan Spiegel will expand programs and create a permanent source of funding.