Novak Djokovic has undergone an elbow operation in an attempt to cure an injury that has troubled him for the past two years.