A left-wing politician who shares his name with fascist dictators Adolf Hitler and Benito Mussolini has become the mayor of a Peruvian town – just one year after he resigned from a right-wing populist party.