Ranil Wickremesinghe, a lawyer who served as Sri Lanka’s prime minister a record six times, has finally made it to the top job, securing the presidency after winning a parliamentary vote on Wednesday despite fierce public opposition to his candidacy.