Computing Networks: A General Framework to Contrast Neural and Swarm Cognitions