A new technique for measuring the effects of oxygen activity on surface energies: Application to nickel