An appeals court admonished a former federal prosecutor for making "unlawful" comments during closing arguments in the trial of a man linked to the 2012 Benghazi terrorist attacks.