Grounding cognition: heterarchical control mechanisms in biology