Emergent Causality and the Foundation of Consciousness