In a warning to Donald Trump, the Hungarian Prime Minister’s loss shows the danger of governing just to please one’s base.