For some young men in particular, the populist pitches from Mr. Sanders and Mr. Trump aligned with their attitudes about the ruling class.