Task-Independent Spiking Central Pattern Generator: A Learning-Based Approach