Schema-learning and rebinding as mechanisms of in-context learning and emergence