As Within, so Without; As Above, so Below: Common Mechanisms Can Support Between- and Within-Trial Learning Dynamics