A Minnesota mayor has been declared the winner of an election after his name was randomly pulled from a bag, breaking a tie between two candidates who received exactly the same number of votes.