Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steering