Modeling Disorder in Proteins Yields Insights into the Evolution of Stability and Function