Indonesian President Joko Widodo was leading in the race to run the world’s third-largest democracy, based on up to 88 percent of samples of votes counted by independent pollsters.