Understanding Change and Stability in Party Ideologies: Do Parties Respond to Public Opinion or to Past Election Results?