States, parties and socialist revolutions