Novak Djokovic beat Casper Ruud in the final of the French Open to become the first man to win 23 Grand Slams.