All-optical bistable switching, hard-limiter and wavelength-controlled power source