Crystal structure and semiconductor-metal transition of the quasi-two-dimensional transition metal oxide, La2NiO4