Efficient and Robust Supervised Learning Algorithm for Spiking Neural Networks