Mrs. Clinton’s main opponent, Senator Bernie Sanders, a self-described Democratic Socialist, has proved to be more formidable than most people, including Mrs. Clinton, anticipated. He has brought income inequality and the lingering pain of the middle class to center stage and pushed Mrs. Clinton a bit more to the left than she might have gone on economic issues.