Complex Homology and the Evolution of Nervous Systems