Novak Djokovic will end the year as world number one for a record eighth time after beating Holger Rune at the ATP Finals in Italy.