Mechanical, Electronic, and Magnetic Properties of NiX2 (X = Cl, Br, I) Layers