All-optical active switching in individual semiconductor nanowires