In network spread (single- and multi-threaded), added check so that
nodes that receive input from multiple matrices are not reset more than
once. In weights_alloc, set all values (including states) to zero.