A Theory of Rigid Extremists and Flexible Moderates with an Empirical Application to the U.S. Congress