Common and Distinct Mechanisms of Cognitive Flexibility in Prefrontal Cortex