gold trims gains; oil adds to losses on bernanke