Ex-Dunk Contest champion announces his retirement from NBA