Rewards and uncertainty jointly drive the attention dynamics in reinforcement learning