From Si Nanowires to Porous Silicon: The Role of Excitonic Effects