Novak Djokovic has pulled out of ATP Finals after beating Lorenzo Musetti, but not before setting new hardcourt mark.