Evolving Collective Cognition in Human-Agent Hybrid Societies: How Agents Form Stances and Boundaries