A systems analysis of neural connectivity and functionality in Caenorhabditis elegans