Novak Djokovic ended his season by pulling out of two big tournaments.