Cortical neural population dynamics for flexible motor control and motor learning