Optical properties of silicon nanowires from cathodoluminescence imaging and time-resolved photoluminescence spectroscopy