Which historical event directly influenced the shift from public opinion being gauged primarily by newspapers to being measured through scientific polling?