Bill Cosby returned to the stage for the first time in nearly three years ahead of his retrial over alleged sexual assault.