Carlos Sainz has won the Dakar Rally for a fourth time, becoming the oldest winner of the race at 61.