Pressure-induced magnetic transition in metallic nickel hydrides by ab initio pseudopotential plane-wave calculations