A federal appeals court on Friday upheld former Giants slugger Barry Bonds’ obstruction-of-justice conviction stemming from rambling testimony he gave during a 2003 appearance before a grand jury investigating elite athletes’ use of performance-enhancing drugs.