Evolution of Fermi level position and Schottky barrier height at Ni/MgO(001) interface