Spending on research at UW-Madison declined by more than $100 million between 2012 and 2015, leading the university to fall from the top five of the National Science Foundation’s ranking of research institutions for the first time in more than four decades.