Bistable solitons and optical switching