Sebastien Ogier made up for his Mexico crash by winning the Rally of Portugal for a second consecutive year.