Nanostructured silicon for photonics: from materials to devices