In the last two years, the Democratic Socialists of America have animated much of the intellectual ferment in city politics, gaining a foothold after helping propel Alexandria Ocasio-Cortez into Congress.