All-Optical Logic Gates Based on Quantum-Dot Semiconductor Optical Amplifier