Novak Djokovic reached his first final in almost six months as he thrashed Grigor Dimitrov.