Consciousness, natural and artificial: an evolutionary advantage for reasoning on reactive substrates