The share of higher-education research supported by federal money hit a historic low in 2018. Private gifts are among the institutional funds that have helped fill the gap.