Structure and formation of porous Si layers as studied by infrared absorption and Raman scattering