Spiking neural network with working memory can integrate and rectify spatiotemporal features