Commodities finish higher; crude edges up, while gold ends near record territory