Roger Federer produced a dominant performance to beat Novak Djokovic 6-4 6-3 in their winner takes all match at the World Tour Finals.