Novak Djokovic has won his 100th ATP title after beating Hubert Hurkacz in three sets in the Geneva Open final.