Ultrafast pattern-operated all-optical Boolean XOR with semiconductor optical amplifer-assisted Sagnac switch