The ruling party is being outflanked by populists on the left and right. The consequences could change British politics for good