Understanding the Evolutionary Origins of Theory of Mind: Computational Modeling of Conserved Cognitive Mechanisms Across Primates