Digital electronic circuit and system implementing a spiking neural network for performing unsupervised detection of patterns