Novak Djokovic sent Serbia into the ATP Cup final after outclassing Russia's Daniil Medvedev in their singles rubber in Sydney.