Allostatic Control of Persistent States in Spiking Neural Networks for perception and computation