Distinct Circuit States Enable State-dependent Flexibility in a Rhythm Generating Network